Hi community!
I wanted to create this article that would help you with creating sequential tasks. This was one particular use case that I had from my client, so I decided to write an article about it.
Introduction
Parent work item is created that also creates three sub-tasks. When the first sub-task starts, all of the other sub-tasks cannot begin. Second sub-task depends on the first one, third sub-task depends on both of them.
How it was done?
Before jumping to the automation rules, first your Jira space needs to be company-managed to avoid any unwanted issues. Next, you want to create a custom field which will be a Number field. You will then add this field to the screen of the Jira space where you need to have your automation rules. Now, let's begin with the automation rules. This solution has three separate automation rules:
- First automation rule is focused on creating three sub-tasks that will be assigned to three different users which is changed with Choose fields to setup where you would choose Assignee and a new created custom field. For the first sub-task, you would add value 1 to it (I've used Sub-task order field):

All following sub-tasks are going to be the same, except Sub-task order value where for each task that needs to be below is going to be 2,3,4,5,etc.
2. Second automation rule is used to block the second sub-task from moving to the In Progress status, until the first one is finished. Here is the automation rule setup:
- Trigger - Work item transitioned to In Progress
- Condition - Work item field condition for Issue Type equals Sub-task
- Condition - Work item field condition for the custom field numerical value equals 2
- Action - Lookup work item with following JQL query (your Jira space key will be different, so replace it afterwards): project = AR AND parent = {{issue.parent.key}} AND issuetype = Sub-task AND "Sub-task Order" = 1
- Condition - smart values condition - First value: {{lookupIssues.first.statusCategory.name}} does not equal Second value: Done
- Action - Transition work item to your initial status (To Do, Backlog,etc.)
- Optional Action - Add a comment to the work item - it is a good idea for the user that is trying to do the transition why it didn't work
The complete second rule looks like this:
3. Third automation rule depends on the first and second sub-task and depending on how much sub-tasks you have, the lookup JQL query will keep changing.
- Trigger and first condition remain the same, the third condition of the order equals to 3 (if you have more it will continue to increment)
- Lookup work item action JQL query: project = AR AND issuetype = Sub-task AND parent = {{issue.parent.key}} AND "Sub-task Order" IN (1, 2) AND statusCategory != Done
- Smart value condition will be a bit different: First value: {{lookupIssues.size}} greater than Second value: 0
- Transition is the same, comment will differ

2 comments