Forums

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

Add label to parent issue when subtask is created and resolved

Brenton Rose
Contributor
September 1, 2023

Good afternoon,

I am trying to create a rule that automatically applies a label to a parent issue when a subtask is created. I then would like to remove that label when the subtask is resolved. Here is an example.

We service an inventory indexing product. There are times when the issue that arises require an escalation to our dev team for a "reconfigure". This means the dev teams need to alter the indexing scripts to address the issue and re-run the indexing. This team sits outside of the client facing team so the process of adding a sub task for them appears to be the fix workflow.

In order to support these types of escalations our client facing team creates a sub-task from the original ticket. We are having difficulty "seeing" which tickets are sitting in the que waiting on the sub task to be completed. 

Our thought was to add a label to the parent issue called "Pending Dev Review" when the sub task is created. Then inversely when the sub task is resolved trigger an email to the creator of the sub task (I think this part is self-explanatory) but then also removing the label that had been applied to the parent ticket when the sub task is created.

Can anyone point me in the right direction or have thoughts on how to identify these issues better?

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
September 1, 2023

Hello @Brenton Rose 

Yes, you could do this with automation to add and remove a label from the parent issue.

You would need one rule for when the subtask is created, and a second rule for when the subtask is completed.

Here is an example of the rule when the subtask is created.

Screen Shot 2023-09-01 at 9.25.11 AM.png

The trick here is making sure you subtask has unique identifiers so that this is done only for those subtasks that are created for the dev team. Do you have such an identifier on those subtasks? Whatever you use, you would add another condition (or make the Condition check multiple things) to check for that also.

Notice in the Edit Issue action you can click on the ... button to the left of the value entry field and choose the ADDREMOVE option. That is what you would use to add the specific label in the first rule, then remove the specific label in the second rule.

Brenton Rose
Contributor
September 1, 2023

@Trudy Claspill Thank you for the outline. To answer the question no I don't have a specific identifier for the subtask. When Jira creates the subtask it just creates the normal HCS-xxxx value in order of creation. That said this is the only current scenario when a sub task is created so a blanket rule should be ok for now.

Your example is perfect. However the problem I am having is being able to select the "For:Parent" action. I see now how to get there so I will attempt to apply this and get back to you. Thanks for outlining this it helps tremendously.

Trudy Claspill
Community Champion
September 1, 2023

Screen Shot 2023-09-01 at 10.12.36 AM.png

 

Screen Shot 2023-09-01 at 10.12.46 AM.png

Screen Shot 2023-09-01 at 10.13.07 AM.png

Like Brenton Rose likes this
Brenton Rose
Contributor
September 5, 2023

@Trudy Claspill This appears to be working perfectly! thank you very much. One follow-up question for you. Any idea on how to re-apply the same label should the ticket need "re-opened"?

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
September 5, 2023

Create a rule like the first one where you added the label, but instead of the Issue Created trigger use the Issue Transitioned trigger.

Like Brenton Rose likes this
Brenton Rose
Contributor
September 12, 2023

Got it...Thank you again.

Like Trudy Claspill likes this
0 votes
Ayush Ghuliani
Contributor
November 20, 2023

Hello @Trudy Claspill I have similar problem but I am stuck with the 2nd rule to remove the label when sub task is resolved. I have 3 sub-tasks (repititive) for each issue and I want to remove the label when all 3 of them are resolved.

 

Can you please help

Trudy Claspill
Community Champion
November 20, 2023

Hello @Ayush Ghuliani 

Since this Question already has an accepted answer I recommend that you start a new Question to get assistance. Only the people who have authored, responded to, or watch this Question will have seen your request for additional help. If you start a new Question post, more community members will see it.

When starting your new post you can provide a link to this post and explain how it is relevant to your question.

Also provide a full copy of the automation rule you have created and details about how it is not working as your intend.

Suggest an answer

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

Atlassian Community Events