Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

When I move my files from one project to another, they are not marked as removed #298

Open
FinnWoelm opened this issue Feb 7, 2019 · 2 comments
Assignees
Labels

Comments

@FinnWoelm
Copy link
Contributor

When files/folders are moved out of project scope, they are not marked as deleted if that outside scope is also shared with [email protected].

What happens when files are added to a folder that has been moved out of scope?

When setting external_parent= to a file that is currently deleted, also mark child as deleted

@FinnWoelm FinnWoelm added the bug label Feb 7, 2019
@FinnWoelm FinnWoelm self-assigned this Feb 11, 2019
@FinnWoelm
Copy link
Contributor Author

There are three scenarios to test here:

  • Move single file f1 from project p1 to project p2
  • Move folder f1 with files f1 and f2 from project p1 to project p2
  • Move folder f1 from project p1 to project p2 and then add file f2 to folder f1

@FinnWoelm
Copy link
Contributor Author

The fix for this is almost complete. We have identified all the issues and solutions:

  1. When a folder is moved out of a project, its descendants were not marked as removed, leading to orphaned records. Solution: Recursive mark_as_removed on removal
  2. When adding a file to a folder that has been moved out of a project, it would be added to both the old and the new project. Solution: When setting parent_in_branch, check if parent_in_branch is removed
  3. When moving a folder into a new project, only the folder is added and not any of its children. Solution: Trigger a recursive #pull_children when adding a new folder to a branch

Now, we just need some refactoring of the FileUpdateJob because it's becoming too big.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant