nextcloud/approval

Clean approval tag when a new version of file is uploaded

bsoaress opened this issue · 6 comments

Hi,
If a file has been approved, the tag approved or rejected will remains even a new version of file is uploaded.
I think in this case that the approval tag could be clean when a new version of file is save.

Best Regards,
Breno.

I agree, plus there is one more scenario, when approval is rejected, author fix the content and is not able to request approval again.

I agree as well. Both scenarios would be very useful. Currently, we are making a copy of the file to request a new approval. This causes

  • loss of all recend activities on that file
  • loss of the file version history

Surely the solution is to move the file to a read-only approved files folder on approval?

I very much agree with that. The approval process is not ended with the steps "approved" or "not approved".
In fact, this app is not usable in this state, if there is no option to handle file changes or user can not start a new approval request after resolve the issues to the file..

Hi guys. Revoking tags is easily done with two additional applications:

  1. Files Actions (Lua scripting language) - for removing tags
  2. Workflow external scripts - to run the desired script on a file update event.

First you need to create a Lua script like this:

Screenshot_20230309_214523

After that, you need to create a flow like this:

Screenshot_20230309_215443

And everything works. Well ... almost everything :) As a bonus, it becomes possible to remove approval tags via the context menu on any file.

A small annoyance is that you cannot create a flow for the file update event ONLY, you must specify one more criterion - the file name or mime type, or client address, or something else. The request time is best, it's in the screenshot. By the way, seconds cannot be specified there either, so a gap of 1 minute will still remain. You can specify the second same flow, but working within this missing minute.

The big trouble is that approval requests are made through links that have an expiration date. But this is a topic for another discussion, I will write soon.

thekk1 commented

After 2.5 years no one looked at this case although there is a significant feature missing to handle a realistic approval process. That's really sad.