Forums

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

How do I transition a Story to a particular status when only some of the Sub-Tasks advance.

Steve Huffman August 15, 2023

During Backlog Refinement, DEV and QA Sub-Tasks are created.  I want to move the parent Story from IN PROGRESS to CODE REVIEW when all of the Dev Sub-Tasks are completed.  

I am using components to help identify which Sub-Task belongs to which group.  Development Sub-Tasks have Component=DEV and QA Sub-Tasks have Component=QA.

I've built an automation and tried using "If some tasks...", but it will change the Story status if only one DEV task is complete.  I've tried using "If all tasks..." but then the Story will not change status unless all of the QA and DEV tasks are complete.

 

2 answers

1 accepted

0 votes
Answer accepted
Fernando Eugênio da Silva
Community Champion
August 15, 2023

@Steve Huffman , 

You can use lookupIssues to bring a JQL reference of all your Dev Subtask and of all your Dev Subtask Completed.

Try something like this:

Add a lookupIssues action and insert this JQL: parent = {{issue.parent}} AND component = DEV

After create a variable to bring how many DEV subtasks you have inside your Story. Create a variable with the Smartvalue: {{lookupIssues.size}}

After created your first variable, add a second lookup to get subtasks with DEV Component completed. Use This JQL: parent = {{issue.parent}} AND component = DEV AND status = "Completed"

For this lookup create a new variable to get the reference of DEV Subtasks created. Use the same earlier smartvalue: 

{{lookupIssues.size}}

Now you just need add an advanced compare condition comparing your both variable

Screenshot_147.png

After all this, add your branch for Parent and add your action for transition issue.

Hope this helps you :)

0 votes
Trudy Claspill
Community Champion
August 15, 2023

Hello @Steve Huffman 

Please show us your automation rule, particularly the details of your use of "If xxx tasks...".

I think what you will have to do is add two conditions for Related Issues / Subtasks where one condition is

If some match specified JQL

Component=DEV and status=Done

...and the second condition is

If none match specified JQL

Component=Dev and status!=Done

Suggest an answer

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

Atlassian Community Events