Subtasks update parent task

Abi Williams July 31, 2024

Hello all,

I wish to update the parent's task status based on the sub-task. At the moment I have basically tried a few things that don't work.

Has anyone got any automation for this?

We are on a team-managed project. We don't need this outside of this project. 

2 answers

1 vote
Anandhi Arumugam _Cprime_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2024

Hi @Abi Williams Please try something like the one below. If you need specific help, please elaborate your use case.

Automation - Update Parent.png

Abi Williams July 31, 2024

Hello @Anandhi Arumugam _Cprime_

Below is an image.

In this case, i have two sub-tasks that are currently in peer review. I need the parent task to be updated to whatever the latest subtask is. Probably need to be any status other than done.

Screenshot 2024-07-31 162639.png

 

Anandhi Arumugam _Cprime_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 2, 2024

Hi @Abi Williams How do you define the latest subtask? Is it the status or recent status change?

Abi Williams August 5, 2024

Recent status change. So if it changes from Peer Review to QA the latest status would be QA even if one ticket is still In Progress. 

0 votes
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.
July 31, 2024

Hello @Abi Williams 

My suggestion is that you use two rules.

In rule number #1 have the trigger be an Issue Transition, and for Destination Statuses select all the statuses except Done. Add a Issue Fields condition to check that the Issue Type is subtask. If it is then use a For: Related Issues: Parent branch to navigate to the Parent issue and add a Label value to it to indicate its Status needs to be update; something like "Recalculate-Status".

In rule #2 use a Field Value Updated trigger, and look for the addition of a value to the Labels field. Add an Issue Fields condition to check that the Issue Type is one of the types that can have a subtask as a child. Add another Issue Fields condition to check that the Labels field has the value you specified in the first rule; i.e. "Recalculate-Status". Add an Edit Issue action to remove that label value - it was needed only to trigger this rule, and might be needed again in the future. Then use an If-Else condition to evaluate the Statuses of the child subtasks, similar to this:

Screenshot 2024-07-31 at 12.57.03 PM.pngScreenshot 2024-07-31 at 12.58.27 PM.png

The sequence of the If-Else blocks should be checking for the Statuses in order from right (latest) to left (earliest).

 

Abi Williams August 1, 2024

Hello @Trudy Claspill 

Do you have an example of the first one please? I think i roughly know what you are asking for but wouldnt mind it being confirmed.

Cheers.

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.
August 1, 2024

Screenshot 2024-08-01 at 7.50.58 AM.png

Abi Williams August 5, 2024

Hey @Trudy Claspill 

I am trying the second part of your query but i cannot find the generate label? 

Screenshot 2024-08-05 154801.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.
August 5, 2024

Add the label value to an existing issue. Then create this condition in your rule. Then you can delete the value from the existing issue.

Otherwise you would need need to use a smart value condition in order to create the Condition when the label value does not currently exist in any issue.

Screenshot 2024-08-05 at 8.59.25 AM.png

Abi Williams August 6, 2024

Hello @Trudy Claspill 

I can confirm which label field you are using? I appear to get an errors on mine. I use the Labels (System) which appears to work but when trying to search for it on the rule 2 it doesnt appear to find it. If i change to Labels (labels) i appear to get errors. Not entirely sure what to do. 

Screenshot 2024-08-06 174501.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.
August 6, 2024

In my environment the field in a Team Managed project is called simply Labels.

Screenshot 2024-08-06 at 10.05.51 AM.png

Jira allows the creation of custom fields with names identical to field names used for other fields. It appears that you have more than one field in your instance named "Labels". 

Please show us the rules that you have created showing the details of the steps where you are trying to interact with the Labels field. Also show us the Audit Log output for an execution of the rule when it is configured in that manner.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events