Forums

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

Automation: Adding Labels to all child tasks from Initiative and Epic Down

Amy Garcia
Contributor
January 25, 2022 edited

I am trying to create an automation rule for these two conditions:

1. If the label is updated with "PMO" or "ExecutiveRequest" on an Epic, then all of the Stories/tasks under the Epic that get their labels updated to match "PMO" or "ExecutiveUpdate"

2. If the label is updated with "PMO" or "ExecutiveRequest" on an Initiative,  then all of the Epics connected to that Initiative via "Parent Link" that get their label updated to match "PMO" or "ExecutiveUpdate"

I have tried to get the automation piece for the Epics working, but it does not work. (see below for workflow)

However, I cannot find a way to update the Epics, when I add a label to the Initiatives. Initiatives are linked to Epics via the Parent Link.  

11.PNG

1 answer

2 votes
Chris Buzon
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.
January 25, 2022

This is not as easy as it sounds, since there are several scenarios where this could fail, or get difficult.

1) If you add an epic to an already-labelled Initiative, does it need to cascade the label down through the Epics->Tasks->Subtasks?
1b) same question applies to adding children tickets to epics - do they need to update with a label?
1c) do you need them to remove the labels if someone accidentally tags them the wrong way?  This can get really sticky, since you may affect quite a few tickets with these rules.

2) Initiatives are not a standard issue type to out-of-the-box Jira, and so JQL isn't easily able to 'see' initiatives and their relationships to the epics->tasks->subtasks.  You probably need to create several rules to work around that. 


Some ideas - this will require some trial and error, I don't have a solution out of the box for you.

There are several triggers that could work, depending on how your team uses Jira. Scheduled might be ok, or monitoring a specific field (parent link or epic link, for example)

You can use the LookupIssues action to search for tickets with JQL, then in an advanced branch action you can iterate over the results using the {{LookupIssues}} smart object (that's the results of the most previous lookup.  You can do that several times in a rule, and you can assign the results of the query to a variable to pass around the rule and access in different branches.

When working with Initiatives in JQL, you may need to hard-code the query to include all the initiatives (like manually include them in the query, which will need to be updated when new initiatives are created). If you make a lot of initiative tickets, this is not really a feasible/scalable solution.


Amy Garcia
Contributor
January 25, 2022

Thank you for the response, Chris.

1) If you add an epic to an already-labelled Initiative, does it need to cascade the label down through the Epics->Tasks->Subtasks? Yes it would. 
1b) same question applies to adding children tickets to epics - do they need to update with a label? Yes. 
1c) do you need them to remove the labels if someone accidentally tags them the wrong way? Yes, we could bulk edit these as needed, but you are right could get messy quickly. 

Thank you for your recommendation, I will practice my automation rule using the {{LookupIssues}} smart object and see if I can get it to work.  Thank you for your help. 

Like • Chris Buzon likes this
Balaji Ravichandran
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 3, 2022

@Amy Garcia I have a similar request and i was wondering if you have a solution in place as i need to an automation rule to trigger the labels for All Epics under the Initiatives.

Like • Amy Garcia likes this

Suggest an answer

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

Atlassian Community Events