Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-delete tags when a tagged file isn't visible any more #12858

Closed
PVince81 opened this issue Dec 15, 2014 · 7 comments
Closed

Auto-delete tags when a tagged file isn't visible any more #12858

PVince81 opened this issue Dec 15, 2014 · 7 comments
Assignees
Milestone

Comments

@PVince81
Copy link
Contributor

When a file was tagged or marked as favorite, that information needs to be cleaned up from the database whenever:

  1. The file was deleted (or moved to trash)
  2. The file was unshared
  3. The file was moved out of view from a share recipient (ex: owner moves it out of the share)

After discussing with @schiesbn it seems that we'll need to listen to several hooks to cover all these cases.
Ideally I'd like to have a generic hook called "when file goes out of view", if possible.

Part of #2368

CC @icewind1991 FYI in case you got ideas

@PVince81
Copy link
Contributor Author

One idea would be to have a method deleteOrphaned($tagType) on ITags that does a simple SQL delete for a given tag type. That is certainly more efficient than iterating of folder entries.

So: first delete files, then delete orphaned entries. Like some kind of afterwards cascading delete.

That method could then also be used by repair steps.

@PVince81
Copy link
Contributor Author

Fix for 1): #13284

@PVince81
Copy link
Contributor Author

Raised repair step ticket to cleanup orphaned tags: #13334

@PVince81
Copy link
Contributor Author

Defer to 8.1. (CC @DeepDiver1975)
Maybe the background job is the way to go, especially if the logic to resolve shares is slow/complex.

@PVince81 PVince81 modified the milestones: 8.1-next, 8.0-current Jan 20, 2015
@DeepDiver1975 DeepDiver1975 modified the milestones: 8.1-current, 8.2-next Mar 3, 2015
@PVince81
Copy link
Contributor Author

Ok so now we have the repair step for orphaned tags: #13344
Do we also want it as background job / cron ? (just like for shares)

@PVince81
Copy link
Contributor Author

We have a background job now #21990

@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants