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

Flow check for containing directory #19810

Closed
juliusknorr opened this issue Mar 6, 2020 · 14 comments
Closed

Flow check for containing directory #19810

juliusknorr opened this issue Mar 6, 2020 · 14 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: workflows needs info stale Ticket or PR with no recent activity

Comments

@juliusknorr
Copy link
Member

juliusknorr commented Mar 6, 2020

For user flows it would be very useful to add a check that can verify if a file event was performed on a file inside of a given directory.

Basically what we have shown in the mockups of the preannouncement:

image

@blizzz I guess this only makes sense for user scope? I don't remember exactly how those were implemented, if we assume a flow operation is triggered on file change, will the flow be executed only for file changes by the user who has configured or also if someone else changes a shared file that is owned by the user?

@juliusknorr juliusknorr added enhancement 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Mar 6, 2020
@wiswedel
Copy link
Contributor

wiswedel commented Mar 6, 2020

Basically what we have shown in the mockups of the preannouncement:

same for "Send an email" and "Notify me" - would be a huge benefit
cc @jancborchardt

@nickvergessen
Copy link
Member

I guess this only makes sense for user scope?

The thing is we tried to prevent this all the time, because if you have a share received and have that moved into the folder you want the rule to apply, it will not trigger. The rules are only executed on the storage of the actual owner. So this will lead to confusion on all ends all the time.

See https://docs.nextcloud.com/server/17/admin_manual/file_workflows/access_control.html#denying-access-to-folders

@martin-rueegg
Copy link
Contributor

As per #23452 (comment) you can use a tag (aka File System Tag) on the containing folder.

@PVince81
Copy link
Member

PVince81 commented Jan 11, 2021

While using system tags would work for blocking just the folder, it doesn't look like it would allow to say something like "for every file uploaded into folders tagged as X run a script S with the file name as argument" (using workflow_script for example).

Not sure if the script would run at all, maybe just at the time where the folder is created.
Would need another rule that says "if the contents of the folder tagged as X has changed, run the script S on the folder"

My use case is for processing pictures from instant upload for import like auto-rotate, see nextcloud/photos#622

@wiswedel
Copy link
Contributor

workflow_script doesn't work on folders: nextcloud/workflow_script#26

@PVince81
Copy link
Member

Even if it did, the bit that's missing is "trigger the action whenever something is happening inside the folder, not on the folder itself". Maybe it could be called "Parent is tagged with tag T" (or even "Any parent is tagged with tag T)

@nickvergessen
Copy link
Member

So at least with autotagging the thing is triggered on updates as well. Not sure if it's also for the workflow_script, but if there is an update it also works because at least the mtime of the folder changes.

@wiswedel
Copy link
Contributor

wiswedel commented Jan 11, 2021

Parent is tagged with tag T

Interestingly that does work with automated tagging: When file is changed and file system tag is tagged with folderTag then assign tag fileTag.
Then you can run the script on the tagged files.

@nickvergessen
Copy link
Member

Maybe it could be called "Parent is tagged with tag T" (or even "Any parent is tagged with tag T)

I'll leave this here:
https://docs.nextcloud.com/server/17/admin_manual/file_workflows/access_control.html#available-rules

File collaborative tag: Either the file itself, or any of the file owner’s parent folders needs to be tagged with the tag.

@PVince81
Copy link
Member

I guess we could change the text to make it more obvious within the UI that it is recursive.
I've also noted that it still says "system tag" there, which is the very old technical name, so we should also rename it to "collaborative tag".

@wiswedel
Copy link
Contributor

we should also rename it to "collaborative tag"

Why not only "Tag" after all? What's collaborative about them in the first place?

@PVince81
Copy link
Member

PVince81 commented Jan 12, 2021

"Collaborative tag" is the name that was given in the web UI a long time ago.
But it seems in some places it also says just "Tags" so I guess that wording would work as well.

@szaimen
Copy link
Contributor

szaimen commented Jun 23, 2021

So is this option feasible?

@ghost
Copy link

ghost commented Jul 23, 2021

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Jul 23, 2021
@ghost ghost closed this as completed Aug 6, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement feature: workflows needs info stale Ticket or PR with no recent activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants