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

Idea for intuitively removing tags #1010

Closed
MalbrottsAsnan opened this issue Sep 16, 2024 · 1 comment
Closed

Idea for intuitively removing tags #1010

MalbrottsAsnan opened this issue Sep 16, 2024 · 1 comment

Comments

@MalbrottsAsnan
Copy link

MalbrottsAsnan commented Sep 16, 2024

Hi, would it be possible to add a toggle in the flow configuration to delete the tag instead of adding it? This would greatly help with what I'm trying to accomplish, which is to respect both a file's modification date and creation date (which I assume is the upload date of the file, at least when uploading via the web interface).

My flow setup

  1. When a file is changed, if it is tagged with ctime, tag it with mtime
  2. When a file is changed, if it is not tagged with mtime, tag it with ctime

This makes it so that when a file gets uploaded, it only gets tagged with ctime. When the file is modified however, it also gets tagged with mtime. This works as expected, though I have not experimented with different file types or flow rule orders yet.

Interaction with file retention

  • Files tagged with ctime gets removed 60 days after creation
  • Files tagged with mtime gets removed after 60 days after the last modification was made

What I would like to see, without the adding of additional plugins, is being able to remove the ctime tag from files when they receive the mtime tag. This would switch what retention rule the files follow, which in turn would make it so that files are always stored 60 days after creation or last modification.

Proposed behavior

Instead of scanning files for when they no longer meet the tagging requirements, why not just configure it as a new rule? For example, by adding a choice in the flow configuration between "add tag" and "delete tag", it would be possible to have the following rules:

  1. When a file is changed, if it is tagged with ctime, tag it with mtime
  2. When a file is changed, if it is tagged with ctime, remove the tag ctime
  3. When a file is changed, if it is not tagged with mtime, tag it with ctime

This way, a file gets created and is tagged with ctime. When the file is changed, mtime is added and ctime is removed. Since the logic for triggering a rule with conditions is already there, the only thing that would need to be added would be the "remove tag if present" option. Would this be possible and would it be complicated?

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants