approval icon indicating copy to clipboard operation
approval copied to clipboard

Remove mark checked after document change

Open joesch2 opened this issue 11 months ago • 3 comments

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature request

Which Nextcloud Version are you currently using: (see administration page) 30.0.4

Is your feature request related to a problem? Please describe. no

Describe the solution you'd like I can easily apply workflows to documents in my installation. However, if I change a document that is marked as "approved", the "approved" label remains. However, in my opinion, it would be better to remove the approval mark after a document has been changed, as the document is no longer the version requested for approval. After the document has been changed, everyone involved in the approval workflow should be notified.

Describe alternatives you've considered Additionally, the document can be saved in the approved state as a standalone version if the Versions app is installed.

Additional context Image

Thank you very much for working on the app :-)

joesch2 avatar Jan 12 '25 18:01 joesch2

I also just noticed this behavior. When approval is never revoked on changes, the whole approval workflow does not make any sense. In order to not make any accidental small changes https://github.com/nextcloud/text/issues/3923 would also be needed, which is in NC31.

Is there a workaround that we can apply until we have a real solution for this? Maybe a script to be run to detect the "change after approval"?

rvjr avatar Apr 30 '25 15:04 rvjr

I don’t know much about the internal code structure of the plugins, but would it be an option to make this work with the explicit ‘Edit’ button of the above mentioned PR? It could simply check if an approval tag is present on the file, and warn the user with a message box before editing, like “this file is approved via the workflow xyz, do you want to remove approval and edit?”. And if the user continues, the text plugin can remove the respective tags.

Implementation wise this is probably not too much work. I’m just not sure if these interactions between plugins are possible or even wanted? Basically the text app must check if the approval plugin is installed and what tags it uses for its workflows.

Maybe some from the NextCloud team can comment if this would be possible like this?

rvjr avatar May 01 '25 13:05 rvjr

I'm currently using this app, and facing the same "issue".

When a file gets approved or rejected, it should go back to the waiting for approval state if any changes are made, otherwise, whenever a file get changed, the approvers will not get any notification, and think it has already been taking care of. Not a big deal if you only have a few files between 2 people, but for my use case there is hundreds of differents people and documents.

Hopefully this feature will be taken into account, thank you !

LOREMAG avatar May 13 '25 06:05 LOREMAG

Ok I think I found a workaround for this issue now:

  • use separate accepted and rejected tags per approval workflow:
    • your "Review by QA" workflow would use "approved by QA" and "rejected by QA" tags
    • the "Review by Dev" workflow would use "approved by Dev" and "rejected by Dev" tags
    • and so on...
  • for each approval workflow you create two new "automated tagging" flows as follows
    • when "File is changed"
      • and "is tagged with" "approved by QA"
      • and "is not tagged with" "Review by QA"
      • tag with "Review by QA"
    • when "File is changed"
      • and "is tagged with" "rejected by QA"
      • and "is not tagged with" "Review by QA"
      • tag with "Review by QA"

NextCloud really doesn't make our life simple here...

  • It seems that 'flows'
    • cannot remove a tag (can this really be true?), then we also could remove the old approval tag
    • cannot have 'or' conditions (come on!), otherwise one flow per workflow would work

But at least having the "rejected" or "accepted" tag together with the "Review" tag on a file, will make the file show as "Pending approval" again after editing, which is basically what we want. If you need many different approval workflows, this might quickly get unmanageable to administer, but for me with less than 10 different approval workflows this looks feasible for now....

rvjr avatar May 26 '25 15:05 rvjr

Thank you very much for the detailed instructions. This will help for now. Perhaps there will be a way to lock an approved file so that it cannot be modified. The lock should only be able to be lifted by the approver, a specific group or an admin.

joesch2 avatar Jun 08 '25 09:06 joesch2