Automation - Add a label "xxx" to all the tickets having a parent epic with label "xxx"

William Pénet
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!
December 27, 2024

Hello there,

  • I have an EPIC with a label "xxx"
  • This EPIC has child tickets
  • I want all these child tickets to have the label "xxx" when they are either created or updated

I've set up the following automation : 

  • when issue is created or updated
  • refetch data
  • for each {{issue.parent.labels}} with value "xxx"
  • then update ticket
    • field : 'label'
    • value : 'xxx'

This is working well. The problem is that the automation adds the "xxx" label to issues while their parent EPIC doesn't have any "xxx" label. And I don't understand why. 

Thanks for your help.

William

3 answers

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.
December 27, 2024

Hello @William Pénet 

Welcome to the Atlassian community.

Can you provide a screen image of your actual rule? I think there is something wrong with the logic of your branch, but I need to see how you have actually constructed the rule.

Here is an alternate implementation:

Screenshot 2024-12-27 at 10.40.22 AM.png

When: an issue is created or updated

IF: that issue has a parent

THEN: Use Lookup Issues to execute a JQL to find the issue's parent ensuring it is an Epic and it has the specified lable "XXX"

IF: The Lookup found exactly one matching issue (the trigger issue's parent is an Epic and has the specified label)

THEN: Add the label to the trigger issue.

Bill Sheboy
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.
December 27, 2024

Hi @William Pénet -- Welcome to the Atlassian Community!

Yes, and...to Trudy's suggestions:

When combining any other trigger condition with Issue Created, I recommend always adding the Re-fetch Issue action immediately after the trigger (as you show in your original question).  This will help prevent any racetrack errors with issue creation triggering before the rule gets the issue data.

Back to you scenario: what do you want to happen to the child issues when:

  • Someone removes that specific label (e.g., XXX) from the parent Epic?
  • Someone changes the Epic parent for a child issue
  • Someone manually overrides the label in one of the child issues?
  • etc.

Kind regards,
Bill

0 votes
Shiva Kumar Hiremath
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.
December 27, 2024

Hello @Elise Vernier ,

you can try the following Automationlabel.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.
December 27, 2024

@Shiva Kumar Hiremath 

This rule does not match the requirement that label "XXX" be added to the child issues only if it is already on the parent Epic.

0 votes
Elise Vernier
Contributor
December 27, 2024

Hello William, 

Maybe you can try a different automation rule: 

Capture d’écran 2024-12-27 à 17.38.16.png

You can do the same with the trigger "Issue created".  

Hope I help, 

Best regards, 

Elise 

Suggest an answer

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

Atlassian Community Events