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.

5 answers

3 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.

1 vote
Jason Krewson
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

You just need to add a branch into subtasks and transition them before closing the parent. 

Your automation should look something like this if you want to add subtasks: 

  • Trigger: Scheduled (JQL filters your parent issues)
  • Send email
  • Add comment to parent
  • Branch: Subtasks
    • Condition: StatusCategory != Done
    • Add comment: Subtask automatically closed because parent issue..... bla bla bla.
    • Transition issue → Closed
  • Transition parent issue → Closed

Jira will automatically look at the current parent work item and loop through all the subtasks with this, recommend testing in sandbox first before throwing into production of course.

1 vote
Arkadiusz Wroblewski
Community Champion
June 2, 2026

Hello @Suraj 

In my opinion, giving advice like that without seeing your actual automation does not really make sense.

We do not know what exactly we are supposed to tweak.

Please share some screenshots of your current automation (Blanking Personal data), so people can better understand the setup and help you optimize it.

Best,

Arkadiusz🤠

1 vote
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.

Suraj
June 4, 2026

Hi @Germán Morales _ Hiera 
Could you please check this, it will work? please let me know if any thing needs to add to this
SS Automation.png

Germán Morales _ Hiera
Atlassian Partner
June 4, 2026

Hi @Suraj, the structure is right and it will close subtasks. Two things decide whether it closes all of them or quietly misses some:

  • Switch the condition from "status does not equal Done" to status category. As written it only skips subtasks literally named "Done", so any already finished in Resolved, Closed, Cancelled and so on still match, and the rule will try to re transition them, erroring on the ones already in Closed. Use a JQL condition statusCategory != Done, or the Status Category field condition, so it skips every already completed subtask. That's the version Jason and I both meant.
  • "Transition to CLOSED" only fires where a transition to CLOSED exists from the subtask's current status. This is what decides all versus some: if some subtasks sit in statuses with no path to CLOSED, those get skipped or errored. Confirm CLOSED is reachable from every status a subtask can be in, or add an all statuses transition into CLOSED in the subtask workflow.
  • Two quick checks: keep this branch before your existing parent close step (it isn't visible in the screenshot), and the rule is currently disabled, so enable it after one test run. The audit log will list any subtask the transition couldn't move.

If you paste your subtask statuses and their workflow, I'll tell you whether a single transition to CLOSED covers them all or you need the global one.

Suraj
June 4, 2026

Hi @Germán Morales _ Hiera 
here is the workflow of subtask, we are having restriction on the workflows, and aslo attached complete automation SS please check and let me know what needs to be changed here.Screenshot 2026-06-05 075047.pngScreenshot 2026-06-05 075139.png 2.pngScreenshot 2026-06-05 075227.png 3.pngScreenshot 2026-06-05 075307.png 4.pngScreenshot 2026-06-05 074328.png

0 votes
Gunjan Kumar
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

Hello @Suraj 

Could you share a screenshot of the current automation setup? Once I can see how it's configured, I'll be able to suggest the exact changes needed to ensure any open subtasks are closed before the parent work item is closed.

Suraj
June 2, 2026
Suraj
June 2, 2026

image.jpgimage.jpg

Suraj
June 2, 2026
Gunjan Kumar
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

@Suraj I took a look at this as well, and Jason's suggestion is the same approach I had in mind. We can add a subtask branch to the automation, close any open subtasks first, and then close the parent work item. That should meet the requirement.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events