Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Implement reapproval workflow after issue changed/updated.

Pieter Kuppens
Contributor
March 15, 2019

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

1 answer

1 accepted

0 votes
Answer accepted
Jack Brickey
Community Champion
March 15, 2019

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.

Pieter Kuppens
Contributor
March 15, 2019

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)APPROVEDNeeds 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())

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events