Automation for Jira - How to automatically close sub-tasks from a parent issue
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When a Jira issue (for example a story) has multiple sub-tasks underneath it, it might be tedious to close each sub-task 1 by 1 after closing the story.
Not closing the sub-tasks linked to a Story might prevent Jira users from closing a Sprint, since Sprints require all issues (including their sub-tasks) to be closed, as explained in the feature request
JSWSERVER-12012
-
Getting issue details...
STATUS
The purpose of this knowledge article is to provide an example of automation rule that will automatically close all the sub-tasks of a parent issue, after the parent issue is closed.
Environment
- Jira Service Management (JSM) Server / Data Center 4.0.0 and any higher version
- Automation for Jira 7.4.0 and any higher version
Solution
The automation rule can be configured as described below:
Automation rule configuration
- When: Issue transitioned
- From status: Any status
- To: Done ( Feel free to change this status to the one that matches your workflow)
- Branch rule / related issues:
- Type of related issues: Sub-tasks
- Then: transition issue (to place inside the branch)
- Transition the issue by: Selecting the destination status
- Destination status: Done ( Feel free to change this status to the one that matches your workflow)