Forums

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

Automation: Manual epic closure should lead to closing all children including their sub-tasks

Harald Heinz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 25, 2025

Hi,

I want to set up an automation to close down all the epics children and their subtasks. The part with the children works, but the level with the subtasks is still where I struggle. 

  • Tried to add another branch for sub-tasks -> but this will only look for them directly under the epic

Any ideas?

5 answers

3 accepted

1 vote
Answer accepted
Chitra Nagdeo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2025

Hey @Harald Heinz ,

Welcome to Atlassian Community Forum, My name is Chitra and I am part of Jira Cloud support team in Atlassian. I understand you want to close/complete child standard workitem and subtask workitem when the Epic is closed. 

To achieve this you must create two Automation rule:

On second rule check the option "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule."Screenshot 2025-06-25 at 3.53.52 PM.png

The above steps will help you achieve the requirement, thank you and have a nice day!

 

Thanks and Regards
Chitra Nagdeo

 

1 vote
Answer accepted
Thuan_ Do Dang
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.
June 25, 2025

Hi @Harald Heinz ,

You should separate to 2 automation. The first one to close epic children, the second one to close sub-tasks. And don't forget to enable "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule." of the second automation.

20250625_automation.png

Hope this helps!

0 votes
Answer accepted
Alexander Hohmann
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.
June 25, 2025

You could use cascading rules:

  • One triggered when an Epic is closed and that closes all task level items.
  • A second one that is automatically triggered when a task level item is closed that closes all subtasks. You need to enable this rule to be triggered by other rules.
0 votes
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.
June 25, 2025

Hi @Harald Heinz -- Welcome to the Atlassian Community!

I recommend implementing this scenario with one single rule rather than chained rules.  That approach will reduce the risks of rule errors, failures, or an Atlassian automation outage preventing the chained rule(s) from running.  (My understanding is there is no guarantee after an outage that rules which were supposed to run by-events will actually run later.)

 

This approach can be done with one rule as long as there are 100 work items, or fewer, involved. To do this with one rule:

  • trigger: manual
  • issue fields condition: issue type equals Epic
  • action: lookup work items / issues, to gather the child issues of the parent Epic
    • parent = {{triggerIssue.key}}
  • branch on JQL: use the lookup results and each work item's subtasks smart value to gather the full list, children and grandchildren (i.e., subtasks)
    • key IN ( {{#lookupIssues}}{{key}}{{#if(subtasks.size.gt(0))}},{{subtasks.key.join(",")}}{{/}}{{^last}},{{/}}{{/}} ) AND statusCategory != Done
    • action: transition the work item

 

The part which gathers all of the child and grandchild work items is this:

{{#lookupIssues}}{{key}}{{#if(subtasks.size.gt(0))}},{{subtasks.key.join(",")}}{{/}}{{^last}},{{/}}{{/}}

The way that works is:

  • iterating over the lookup results
  • get the work item's key
  • using a conditional expression, check if there are any subtasks found
  • and if so, add those keys, joined together with commas
  • finally, adding a conditional comma between work item keys, except after the last one

 

Kind regards,
Bill

0 votes
Harald Heinz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 25, 2025

Thank you all, the mentioned checkbox made the difference as I already created a second automation. 

But: can somebody explain, how this checkbox works. I mean, how does the second automations rule dynamics work once this checkbox is used with regards to the first rule if it is not explicitly linked?

Chitra Nagdeo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2025

Hey @Harald Heinz ,

 

In Jira automation rules, the setting "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another ruledetermines if a rule can be initiated by actions performed within other automation rulesIf this option is checked, the rule can be triggered by actions in other rules. If unchecked, the rule will only be triggered by its defined trigger. 

Hope this helps!

Regards

Chitra Nagdeo

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events