Workflows - Checking for a recent comment when validating a state change
Hiya,
I'm looking for some assistance in a workflow I'm creating.
USE CASE:
Some of our states require additional information to be present before we can allow that state to be set.
For example, we shouldn't be setting the state 'Won't Fix' without having spoken to the lead, and provided some solid reasons for the issue not being fixed, and so expect that reasoning to be present in the comment of the bug.
The easiest way I wish to approach this is to simply check for a recent comment when the state changes.
Something like..
when state becomes Wont fix if (issue comments last updated > last minute) message "Please supply a comment before closing this" issue state = issue state oldvalue
If you could help me with this workflow, or something similar, that'd be great.
Thanks,
Jim
I'm looking for some assistance in a workflow I'm creating.
USE CASE:
Some of our states require additional information to be present before we can allow that state to be set.
For example, we shouldn't be setting the state 'Won't Fix' without having spoken to the lead, and provided some solid reasons for the issue not being fixed, and so expect that reasoning to be present in the comment of the bug.
The easiest way I wish to approach this is to simply check for a recent comment when the state changes.
Something like..
when state becomes Wont fix if (issue comments last updated > last minute) message "Please supply a comment before closing this" issue state = issue state oldvalue
If you could help me with this workflow, or something similar, that'd be great.
Thanks,
Jim
Please sign in to leave a comment.
It allows move the issue State to 'Won't fix' only using Command Window(Ctrl+Alt+j) with provided comment, because of JT-10337.
As it's a more restricted state, perhaps this extra requirement of using the command window will help to stop people using it without reason.
Thanks for your help.
It just proved cumbersome to have to open the command window to change this state.
Especially as the user would have already added a comment seconds before attempting to change to this state.
It's a shame there's no way of checking for a comment being present within a minute or so, rather than enforcing a different method for changing the state.
Thanks for your help with this though anyway.