Home > Forum > Rules, JS, SQL > Timer vs Comment required

Timer vs Comment required
0

I have a Step with a "cancel" path. On this path I have enabled "comment required" => User always should enter a comment if he is cancelling the workflows.

Now I have a "housekeeping" timer in that step.
The timer exections an action (Change field value => [System]Comment) and has path transistion after action execution "cancel"

=> Timer throws an error: field validation "Comment" on path "cancel".

1. idea:
I make a special cancel-path for the timer => problems:
* I have more such steps => would result in many workaround paths
* Some cancel path do have flow-control behind, to determine the correct final step

2. Idea:
I disable "comment required" in that path and create a form-rule which checks if the user is a real user or the system-user. Then checking the comment => found no way (via form-rule) to check if the user has entered a comment or not. Could be doable via JS I guess, but want to avoid that.

Any solutions, ideas?

Thanks Ernst

MVP

Hi Ernst,

while I haven't tried it you could add an action to the timer which set's the comment.

Otherwise you could use this approach to check in a validate action if the user added a new comment:
Get current comment
https://daniels-notes.de/posts/2024/current-comment
I'm not sure, whether this still works in the latest version.

I don't see any other option beside the already mentioned option to create new paths. Would still be better then adding a flow control, which handles the "is system user" and executes a path with/without comment required. :)

Best regards,
Daniel