Forums

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

How to create a subtask when a specific subtask is marked done

rs2di32 August 18, 2023

I am trying to automated the following but struggling to get it right:

 

I have a subtask "Subtask 1" and when I mark Subtask 1 as Done, I want to create Subtask 2 on the same parent issue.  

2 answers

1 accepted

1 vote
Answer accepted
Ste Wright
Community Champion
August 18, 2023

Hi @rs2di32 

How are you identifying Sub-task 1, to create Sub-task 2? 

You can create a Sub-task when one is closed using the below rule - but this would happen perpetually - so if you want to limit it depending on a unique identifier, you'd need additional conditions.

---

The rule might generally look like this...

  • Trigger: Issue Transitioned
    • To Status = Done
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Sub-task
  • Branch: Related Issues
    • Type = Parent
      • Branch-Action: Create Issue
        • Project = Same Project
        • Issue Type = Sub-task
        • Parent = Current Issue
        • Fields...
          • Summary = <summary here>
          • ...etc

---

Let us know if this helps :)

Ste

0 votes
Asish Sinha
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 18, 2023

Hi rs2di32, 

I was tempted to share the automation JSON file but then it has a lot of information. Let me share the steps I did to achieve this automation. 

  1. Create a trigger with "Field value changed" and set "status" as the field to monitor for changes. The rest of them keep it as default. 
  2. Add an "IF condition" component next where you check for the Field "Issue Type" where the condition equals to "sub-task"
  3. Add another "IF condition" component where you check for the Field "Status" where the condition equals "Done"
  4. Add a "For Each" component and choose "Branch Rule". And select "Parent" as the type of related issue.
  5. Then inside the branch "Add an Action" component, with "Create New Issue" and enter the specific Project where you want to run this, choose the issue type as "sub-task" and set the Parent Issue as the "Current Issue", and set the summary with the desired text. 
  6. Publish the automation rule. 

Please run this rule and it should create a new sub-task under the same Parent issue, for the sub-task that has transitioned to DONE status.

I hope this helps. 

Thanks,
Asish

Suggest an answer

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

Atlassian Community Events