Automation rule, to move a parent to In Progress just when the last sub-task moved to In Progress

Sara Chaves May 23, 2023

Hello, 

I just wanted to move a parent of a sub-task when the last sub-task of that parent moved to In Progress. 

Is this possible?

2 answers

1 accepted

0 votes
Answer accepted
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.
May 23, 2023

Hello @Sara Chaves 

Welcome to the Atlassian community.

What status do you want to assign to the parent issue in that case? Does it matter what status the parent issue is currently assigned before you make the change?

What would the statuses of the other subtasks be at this point? Do they all have to be In Progress, or could some of them be other statuses like Done?

Sara Chaves May 25, 2023

So

Parent issue -> To Do
Sub task 1 -> To Do
Sub task 2 -> To Do
Sub tast 3 -> To Do

THEN

Parent issue -> To Do
Sub task 1 -> In progress
Sub task 2 -> To Do
Sub task 3 - > To do

Then

Parent issue -> To Do
Subtask 1 -> Done
Sub task 2 -> In Progress
Sub task 3 -> To Do

Then 

Parent issue -> In Progress
Subtask 1 -> Done
Sub task 2 -> Done
Sub task 3 -> In Progress


Then

Parent issue -> Testing
Subtask 1 -> Done
Sub task 2 -> Done
Sub task 3 -> Testing

Then

Parent issue -> Done
Subtask 1 -> Done
Sub task 2 -> Done
Sub task 3 -> Done

This is what I would like the status of the Parent will just change when the last sub-task also changes.

Is this possible?

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.
May 25, 2023

So when you say the "last" subtask, you mean the last one in the list of subtasks, correct?

Do you have some unique identifier on the "last" subtask that exist on all "last" subtasks and not on any other subtasks; a label, or a Summary, or unique issue links, or some other attribute?

Sara Chaves May 25, 2023

No, because for some tickets, I could not know from the beginning what could be the last one to be moved. 
So I would need to know what would be the last one to be able to automate that, right?

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.
May 25, 2023

I did a bit of experimenting and it appears that this smart value will refer to the subtask that is "last" in the visual list of subtasks in an issue.

{{issue.subtasks.last}}

I am not positive that is 100% reliable. I did not do a lot of testing, and only tested with a Company Manage project. I did try reordering the subtasks in an issue and rerunning an automation rule to print {{issue.subtasks.last.key}} and it was consistently printing the issue key of the last task in the list.

So, you could use an automation rule like this:

Screen Shot 2023-05-25 at 9.29.56 AM.png

"Copy from trigger issue" works in the last step if your subtasks and parent issues use the same workflow/status values.

Sara Chaves May 29, 2023

It worked, thanks a lot

Like Trudy Claspill likes this
1 vote
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

Hi @Sara Chaves and welcome to the community,

Use the following rule:

rule subtasks.png

Suggest an answer

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

Atlassian Community Events