Skip to content

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

Closed

Description

@PVince81

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

Activity

  1. self-assigned this
    on Dec 15, 2014
  2. added this to the milestone on Dec 15, 2014
  3. PVince81 commented on Jan 12, 2015

    @PVince81
    ContributorAuthor

    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.

  4. PVince81 commented on Jan 12, 2015

    @PVince81
    ContributorAuthor

    Fix for 1): #13284

  5. PVince81 commented on Jan 14, 2015

    @PVince81
    ContributorAuthor

    Raised repair step ticket to cleanup orphaned tags: #13334

  6. PVince81 commented on Jan 20, 2015

    @PVince81
    ContributorAuthor

    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.

  7. modified the milestones: , on Jan 20, 2015
  8. modified the milestones: , on Mar 3, 2015
  9. PVince81 commented on Apr 15, 2015

    @PVince81
    ContributorAuthor

    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)

  10. ghost added this to the milestone on Sep 21, 2015
  11. ghost removed this from the milestone on Sep 21, 2015
  12. PVince81 commented on Feb 11, 2016

    @PVince81
    ContributorAuthor

    We have a background job now #21990

  13. lock commented on Aug 6, 2019

    @lock

    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.

  14. locked as resolved and limited conversation to collaborators on Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions