Forums

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

Help on creating a JIRA Automation Rule

Heba Hasan March 24, 2025

 

Hello All,

My EPICS contain 1 or more Issues (Stories, Tech Stories, Spikes, bugs,....). I want to create an automation rule as follows:

  1. Trigger whenever a Story or Technical Story is transitioned to DONE 
  2. Branch to Parent as long as it is an EPIC
  3. Check if all children only of type  Story & Tech Story (excluding bugs) are in DONE status --> (note: adding condition with Related issues as "Stories (or other issues in EPIC)" is not helping here)
  4. Transition the EPIC to DONE

My main problem is #3 above so would you please help me to achieve this?

I really appreciate any help you can provide.

3 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Stephen_Lugton
Community Champion
March 25, 2025

Hi @Heba Hasan 

The automation below should do what you want, with the exception that I don't have Technical Story set up as an issue type so you'll need to update the JQL in steps 4 and 5, and you could remove the check for epic status in step 4 (in fact if you're hierarchy is set up so that stories and tech stories are always under an epic you don't need step 4 at all):

When all issues are completed close parent.png

0 votes
Vishal Biyani
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.
March 24, 2025

@Heba Hasan 

I think below approach will address your use case

Trigger

When Issue Transition

Component (if)

Check if the transitioned issue is a standard Issuetype

issuetype in standardIssueTypes()

Note: You can filter based on specific issue types

Component (lookup issues)

Use below JQL

parent = {{issue.parent.key}} and issuetype in (Story, Tech Story) and status != Done

Create Variable

variable name: varIssueCount

Smart Value: {{lookupIssues.size|0}}

Component (if compare two values)

Check if varIssueCount = 0

if Yes, this means all Story and Tech Story are in Done status

Branch (For Parent)

Then: Transition Issue to Done.

 

See if this logic works for you.

0 votes
Pasam Venkateshwarrao
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.
March 24, 2025

Hi @Heba Hasan 

Welcome to the community, i have attached the Automation rule as similar which you are looking

Screenshot 2025-03-25 at 9.55.15 AM.png

 

Hope this helps

Stephen_Lugton
Community Champion
March 25, 2025

Hi @Pasam Venkateshwarrao 

This automation would work for setting child stories, etc. in an epic to Done when the epic was set to Done instead of setting the epic to Done when all of the stories or tech stories are set to Done, but you would have to be sure that your workflow allows issues to transition to Done from all statuses for it to work as expected.

TAGS
AUG Leaders

Atlassian Community Events