Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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).

  • Multimedia
    nameBildschirmaufnahme 2022-03-24 um 17.25.54.mov
    width53%
    autostarttrue
    height53%


...

  1. Create a new custom field of type „text (single line)“ and name it e.g. „internal control field“ and put it on your EDIT screens only (not on VIEW screens).



  2. Get the ID of that new field and remember that for later: switch into Jira's adminstration → Custom Fields and proceed as shown on the screen copy below.

  3. Modify your workflow and add a transition from state X to X (transition with keeping the status), then add a workflow post function "Update issue custom field" to set the value of the custom field, you have just created:



    Below, you see the result:



  4. 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:

    Code Block
    // "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>");	
    }



    Image Modified

  5. DONE: now, you can click on transition „Reject Decisions“ and this sets back the field:

...