Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Add a label to any issuetype inside of a specific Epic

Sara Chaves yesterday at 11:24 AM

Hi, I would like to create a rule, in order to when I create a ticket of any issuetype, and the parent of that ticket is a specific Epic, I want to add to the ticket a specific label. 

How can I do that?

1 answer

1 vote
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.
yesterday at 11:31 AM

Hello @Sara Chaves 

Have you tried to create this Automation Rule? If so, please show us what you have so far.

Do you have any experience with creating Automation Rules? If you have little or no experience with this feature I encourage you to take advantage of the free, on-demand training available from Atlassian University, You can find topics with this search:

https://university.atlassian.com/student/catalog/list?search=jira+automation

The documentation for Automation Rules is here:

https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/

The basic structure of your rule would be:

TRIGGER: Issue Created

CONDITION: Related issues condition
Related issues: Parent
Condition: Matches specified JQL
Matching JQL: key = insert issue key for the Epic

ACTION: Edit issue
Select the Labels field
specify the Label value to add

Sara Chaves 21 hours ago

I yes I have already been creating automation rules, and I followed that basic strutucture. 

My problem here is that is what is the issueKey for that specific epic? 

I tried with Epic Name = Epic Name but it didn't work.
Here is what I did:

Screenshot 2025-03-14 at 08.48.37.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.
16 hours ago

The issue key for any issue is the ABC-123 identifier for that issue.

Screenshot 2025-03-14 at 7.21.45 AM.png

 

Below the JQL field in the Related Issues Condition there is a Validate query feature. If you click that do you get any results for your current JQL?

If you change the JQL do to what I suggested do you get any results from the Validate feature?

With your rule as it currently is, what information is written to the rule execution Audit Log when the rule executes?

Sara Chaves 15 hours ago

it worked thanks a lot

Like • Trudy Claspill likes this
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.
15 hours ago

You're welcome!

If my response helped you solve your requirement please consider clicking on the Accept Answer button to mark your Question as Solved.

Sara Chaves 15 hours ago

Also another question, is it possible in the same rule, say that I want to apply this to any issue created and to the issues that already exist in the epic?

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.
15 hours ago

The rule is currently triggered by Issue Created, so it will run for each newly created issue.

You could also, within this rule, review all the issues under the same parent Epic to make sure they have the Label if it should be there. To do that you would add a For Each: Related Issues: JQL step. Use that step to find and iterate over all the issues that have the same Parent as the trigger issue.

Screenshot 2025-03-14 at 8.21.30 AM.png

 

If you wanted to evaluate all the existing child issues for a set of existing Epics then you could use a rule that uses a Scheduled trigger and use a JQL in that trigger to lookup all the issues in a specified set of Epics:

parent in (ABC-123, ABC-456, ABC-789)

Then use the same condition and action used in your existing rule to update the child issues found.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events