Forums

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

Jira automation: Transition Epic if no other story is in a particular status

Firas Majid January 31, 2021

Hi, 

 

I'm creating a new set of rules in my project and I'm in need of help with a automation rule. 

 

My Epics contain many stories and they in turn can have different statuses. 

I want to create an automation for when a Story is transitioned to "Analysis". Then I would like my Epic to also get this status, "Analysis". BUT if another Story within the same Epic already has the status "Blocked", I would keep my Epic in "Blocked" (another automation rule I have). 

So i need the following:

- When Story is transitioned to "Analysis" enter rule:

--- If any of the other stories in the epic is equal to "Blocked", transition Epic to "Blocked"

- Otherwise transition Epic to "Analysis"


My first problem is that I can't find anything to loop through other stories with the same parent.

1 answer

1 accepted

2 votes
Answer accepted
Ste Wright
Community Champion
January 31, 2021

Hi @Firas Majid 

This is possible using Branches. I don't have those specific statuses, but this is how I built it an example:

  • Trigger: Issue Transitioned - to Analysis
  • Branch: Set type of related issues to Epic (parent)
  • In the branch:
    • Condition: Related issues condition. Set Related Issues to Stories (or other issues in this Epic), the Condition to None match specified JQL and the Matching JQL to status = Blocked
    • Action: Transition Issue, setting the Destination Status to Analysis (or copying it from the trigger issue)
  • Branch: In this second branch, set type of related issues to Epic (parent)
  • In this branch:
    • Condition: Related issues condition. Set Related Issues to Stories (or other issues in this Epic), the Condition to Some match specified JQL and the Matching JQL to status = Blocked
    • Action: Transition Issue, setting the Destination Status as Blocked

This worked for me. Let us know if it works for you :)

Ste

Firas Majid January 31, 2021

thx @Ste Wright . I played around with branch rule but this was gold! 

I only saw the related issues in a branch rule which didn't help at all. But you pointing out the Condition to related issues is spot on. Together with Matching JQL this actually solves a couple more questions I had down the same line.

 

Much appreciated sir!

Like Ste Wright likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events