Automation help needed: Transition Parent and Sub-Task when a specific sub-task is transitioned

Stacey Jones October 18, 2024

Hello,

I'm hoping someone can help provide some guidance. I am new to Jira and automation. 

I am attempting to build out a process flow for a new board.

I am creating a series of sub-tasks when the Parent Story/Bug is added to a sprint: DEV, Code Review, QA, UAT, Deploy, Validation. 

I want to automate moving the sub-tasks to the appropriate status when the previous task is completed. 

I've created the following rule:

When the DEV sub-task is transitioned to "Done" > Update the Parent to "Code Review." Then update the "Code Review" sub-task to Code Review as well. 

The first step is working, the parent is moving to Code Review after the "Dev" sub-task is moved to done. The Code Review sub-task however is not updating. 

Any guidance or tips would be greatly appreciated!

 

2024-10-18_09-45-20.png

2 answers

1 accepted

5 votes
Answer accepted
Bill Sheboy
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.
October 18, 2024

Hi @Stacey Jones -- Welcome to the Atlassian Community!

Yes, and...to the suggestion from @Trudy Claspill 

You could use a single branch to both the parent Story and the sibling sub-task for the "Code Review".  Assuming the trigger issue is a subtask, the JQL for the branch would be this:

key = {{triggerIssue.parent}}
OR (
parent = {{triggerIssue.parent}}
AND issueType = "Sub-task"
AND summary ~ "\"Code Review\""
)

Then perform the issue transition action.

 

Kind regards,
Bill

Stacey Jones October 18, 2024

Thank you for the solutions, this worked!! 

Like Bill Sheboy likes this
0 votes
john_monteith
Contributor
October 18, 2024

What does the audit log show?

Stacey Jones October 18, 2024

Here is what the audit log shows: 2024-10-18_10-51-07.png

Stacey Jones October 18, 2024

CCT-87 is the parent

The code review sub-task that is not updating is CCT-90, which isn't mentioned in the log. 

john_monteith
Contributor
October 18, 2024

The subtask is not being referenced because your branch is for the parent issue (CCT-87) so when you run your JQL conditional statement it is checking if the "Issue matches JQL" that issue at this point being the parent issue. 

What you can do is that if your if condition regarding subtasks of the parent issue being present is true, then create a branch for those subtasks and check to see if they meet your JQL condition, if they do, then transition them to "Code Review"

Query response capture.PNG

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 18, 2024

@john_monteith It is not possible to create a Branch inside of another Branch. Notice that FOR is not available at this point.

Screenshot 2024-10-18 at 11.41.56 AM.png

@Stacey Jones 

Welcome to the Atlassian community.

You will need to add a separate branch to your rule to change the focus to the "sibling" sub-task:

Screenshot 2024-10-18 at 11.45.36 AM.png

Use the For: Related Issues: JQL option and a JQL to find the desired sibling subtask. Make sure that you uncheck the box indicated by the arrow in the image above.

 

Like Bill Sheboy likes this
john_monteith
Contributor
October 18, 2024

Trudy, you are absolutely correct, apparently my brain took off early for the weekend. Stacey, my profound apologies.

Suggest an answer

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

Atlassian Community Events