Within "Rules" you can configure:
to rollback previous decisions triggered by a workflow transition e.g. into the same status (keep status unchanged but offer a related button for the user as action).
Switch to Group Sign-Off configuration, open the tab „Rules“ and insert the code as displayed below, but modify the name of your newly created field using your correct
field id for "customfield_xyz" having set "xyz" to the ID of your newly created field:
// "Revert Sign-Off" is customfield_xyz; if (issue["customfield_xyz"] == "revert approvals") { // first, clear the control-field "Revert Sign-Off" to avoid further launches while processing the functions below issue.update("customfield_xyz" , ""); // second, execute the revert-functions you need issue.revertAllDecisions("<group sign-off fieldname-1>"); issue.revertAllDecisions("<group sign-off fieldname-2>"); } |
Explanation:
Clicking on transition "revert decisions", the configured constant value will be put into that issue's custom-field. Displaying this issue, the configured rule will be executed upfront: if the related custom-field contains this special constant value, all decisions of the specified group sign-off property are reverted via the helper-function. Afterwards, the constant value needs to be reset back to empty ("") in order to omit additional reverts while loading next time.