Forums

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

Automation

Suraj
June 2, 2026

We currently have an automation that closes work items on selected projects where the work item was created 2 weeks or prior in the past, and the team field is empty.

We need to enhance the automation to check for open subtasks on the work item, and close them as well.

2 answers

2 votes
Yashaswini YK
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 Champions.
June 2, 2026

Hi @Suraj ,

To include subtask closure, add a Branch Rule / Related Issues → Sub-tasks after the already existing trigger and conditions, but before the action that closes the parent work item.

Within this branch, add a condition to check for open subtask, then add action to transition it to the desired closed status. Once all subtasks have been processed, the rule can continue with the existing action to close the parent work item.

0 votes
Germán Morales _ Hiera
Atlassian Partner
June 2, 2026

@Suraj, the branch approach already posted is right. Two details decide whether it closes every subtask or just some:

  • Inside the branch, only check status, not the parent's conditions. Use "status category is not Done". The age and empty-team checks describe the parent; subtasks don't carry the team field, so re-applying them would skip most.
  • The transition must be reachable from each subtask's current status. If subtasks sit in different statuses, one hardcoded transition fails for some. Add a global (all-statuses) transition into your closed status, or check the audit log after the first run for the ones it couldn't move.

Keep the subtask branch before the parent-close action, that also satisfies any "all sub-tasks resolved" validator on the parent. Branch on sub-tasks.

If you share your subtask statuses I'll tell you whether one transition covers them.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events