The requirement I have is that an issue should be reapproved if someone changes it after it was already Approved.
So the issue is in an 'Approved' state we defined. When the issue is changed, I want a workflow state transition to 'For Approval'.
The change can happen either by adding a linked issue, especially a (sub)task, or editing fields.
Adding comments is out-of-scope, so if adding comments makes this transition or not is not important. Just like timekeeping.
Also out-of-scope is changing the state on Closed issues.
I investigated adding a custom event copy of 'Issue Updated' but that seems intended to send emails, but I want a workflow transition.
Can this be done using Jira Cloud (optionally using Scriptrunner)?
Hi @Pieter Kuppens , you will need some form of automation to result in the transition back. Unfortunately the OOTB automation is insufficient here. As you said, Scriptrunner could work for this if you have it. Other addons I could suggest: Automation for Jira (I use this and really like it), Power Scripts (I don't use today but seems quite powerful). There may be other addons that would work so check marketplace.
Thanks! I think I have sufficient clues on how to start implementing this in a workflow using Scriptrunner. Otherwise, I'll look into Automation for Jira that looks both user-friendly and powerful.
For future reference, and other people who may be interested:
I intend to use Scriptrunner - Script Listener - Issue Updated
http://scriptrunner-docs.connect.adaptavist.com/jiracloud/script-listeners.html#_issue_updated
I look up the transition id from the text version of the workflow:
Approved (4) | APPROVED | Needs Reapproval (231) |
def res = post("/rest/api/2/issue/" + issue.id + "/transitions") .header("Content-Type", "application/json") .body([ "transition": [ "id": "231" ] ]) .asString() assert res.status == 204 logger.info(res.toString())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.