Create Subtask after all Subtasks are done

thrilos07 March 5, 2021

So right now I created this Automation Task:

bug1.jpg

Where four subtasks get automatically created once an Issues-Type of "Bug" gets created. What I want to do now is to create another two subtasks once all four of the Sub-Tasks are set to "Done". I came up with this:

bug2.JPG

But this does not seem to work. Any ideas?

2 answers

1 accepted

1 vote
Answer accepted
Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2021

Hi,

I posted a possible solution to the problem in your other post https://community.atlassian.com/t5/Jira-questions/Only-transition-a-sub-task-when-an-other-sub-task-is-done/qaq-p/1629325, which hopefully helps to diagnose why your current rule set up is not working as expected.

Cheers

Sam

0 votes
Jimi Wikman
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.
March 5, 2021

It seems like a lot of work for a bug...

May I ask why you want to create subtasks in this way, so I understand the why before I suggest a solution to solve it technically :)

thrilos07 March 5, 2021

Hi,

the Bug-Issuetype which got chosen here was just an example. :)

We do not want the Sprintboard to be full of Subtasks. We want to be done with Subtasks which are bound to "Step 1" before the rest of the Subtasks who are bound to "Step 2" show up. We just don't want to have like 6 subtasks inside of this Issue from the start.

Jimi Wikman
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.
March 5, 2021

There are many solutions to solve that particular issue, but let's start with the workflow you have, so I understand what you are trying to do.

When someone creates a bug, what is that? A defect or Incident?

Secondly, what subtasks do you create first, and why do you need them? Is it because the workflow does not allow you to work with the bug in a workflow, so you create it in sub-tasks instead, or is it to force a definition of done?

As you say the second trigger should be for step 2, what is that step? Does that step have a workflow transition as well that we can use? What are the additional 2 subtasks you want to add?

thrilos07 March 5, 2021

The reason why we use sub-tasks is to break that Issue down to smaller tasks. Now, lets say we have in total 5 sub tasks, which are always the same and also are done in this order:

1. Read Bug-Report (Step1)
2. Rewrite that Report (Step1)
3. Fix (Step2)
4. Test (Step2)
5. Release (Step2)

So whenever we create a new Bug-Issue we just want the Step1 sub-tasks to be displayed. Once they are set to "DONE" we want the Step2 sub-tasks to appear in the same issue. The transition columns are "OPEN", "IN PROGRESS" and "DONE". I do not really want to change anything there, what I want is to decide when which subtask is displayed.

Jimi Wikman
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.
March 5, 2021

So you want to force a DoD as well as create a subtask-based workflow, so you have a two dimensional workflow, got it. I have opinions on that, but it will not help you solve this issue, so let us focus on  solution to this instead :)

The issue is that since you do not seem to transition based on responsibility, this will be a bit tricky. You need some way to focus the trigger, or you will end up in an infinite loop that create new subtasks as soon all subtasks are closed.

If we can assume that step one is pretty much mandatory for step 2 in your list, then I would add a label or some form of data to identify that particular subtask. Then you can trigger the second batch of subtasks when that subtask get closed only.

With that approach you can also create new subtasks for test and release when the previous step is closed.

Would that work?

thrilos07 March 5, 2021

"If we can assume that step one is pretty much mandatory for step 2 in your list, then I would add a label or some form of data to identify that particular subtask. Then you can trigger the second batch of subtasks when that subtask get closed only."

 

Yes, this is what I am looking for. This is also what I tried by creating the second automation rule (see 2nd picture). But I could not find any solution to that.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events