Forums

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

JIRA Automation : Copying the highest priority from a set of child Epics to the Initiative

Chris Smith July 8, 2022

Hi Folks, 

  Hope somebody has a good trick for doing this. I have lots of Initiatives and lots of Epics, with "ParentOf / ChildOf" relationships between them (can be multiple in both directions)

 

So what I want to do is in JIRA automation to loop through the Epics linked to an Initiative, and set the Priority on the Initiative to be the Highest priority in all the Epics.

I would like trigger this logic whenever a Epic priority is changed, or when an ParentOf assocation is added/removed, but I can work that part out. What I havent managed is how to do that looping through.

Ive managed to loop through the linked Epics from the Initiative, but I dont see to be able to set a field in the Initiative (the triggerissue)?

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2022

Hi @Chris Smith -- Welcome to the Atlassian Community!

You may not need to loop through these; instead only find an example issue with the "highest" priority.

For example, try writing some JQL which will find all the relevant issues you want, and then add an ORDER BY Priority ASC

Now the last one should have your target priority, so your rule could be something like this:

  • trigger: priority changes
  • condition: issue type is epic
  • action: lookup issues to gather the issues, using the JQL you created, and referencing the {{triggerIssue.key}}
  • branch: to the the initiative (perhaps using JQL)
    • action: edit the issue's priority, setting it to the target value with {{lookupIssues.last.priority}}

Kind regards,
Bill

Chris Smith July 14, 2022

Thanks Bill. It never crossed my mind to use the order by in the automation  rule!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events