Forums

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

Add or remove exact label from epic/parent issue to trigger issue

Amy Hu
Contributor
July 20, 2023

Requirement: sync label changes from epic to story to sub-task.

For example, epic has label "a" and "b", story has label "b" and "c", sub-task has "d".

When: epic's label changes from "a" "b" to "a" "x", story should have "a" "x" "c" instead, and sub-task changes its label to "a" "x" "d" as well.

I know the change value of label is an array other than simply deleting "b" from epic, so considering "a" is a change to epic is also accepted to me, as long as the requirement can be fulfilled.

 

I tried many searches in community and happened to find a recommendation of a complex lookup function - but it's quite complex to me and the result didn't come positive.

I also a bit curious why there's no easy way to implement this automation requirement, since a label change and sync is a quite common action.

1 answer

1 accepted

0 votes
Answer accepted
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.
July 21, 2023

Hi @Amy Hu 

I believe the solutions you found in the community posts using multiple rules and changelogs is currently the only way to do a label sync with automation rules.  There are marketplace addon apps which make this easier if you wish to purchase them.

You note this type of sync is a common action.  I find there is quite a lot of variability in how teams use Jira to manage work.  What may seem common for one team may be quite different for others.  For example, what does "sync" mean: exact match of parent to child, the child can have more values, etc.?

If you have tried the rules you found and they did not work, please post images of your complete rules and the audit log details showing the rule execution, and explain what is not working as you expect.  That context will help the community to offer suggestions.  Thanks!

Kind regards,
Bill

Amy Hu
Contributor
July 26, 2023

Hi @Bill Sheboy

Thanks for the feedback. I actually tried your suggestion posted on: https://community.atlassian.com/t5/Jira-Software-questions/Rule-for-Copy-and-Remove-Labels-to-child-issues/qaq-p/2169271, and got issues.

Xnip2023-07-26_17-35-46.jpg

Before: epic doesn't have a label, its one of story has a label "rule_trigger_rule".

Change: add label "discarded" to epic.

Expected result: story's label is changed to "rule_trigger_rule", "discarded".

Issues:

1. Story's label is replaced other than added, only "discarded" remains.

Xnip2023-07-26_17-41-47.jpg

2. Error shows in the automation log: for the JSON:

 TD-112 (Field 'labels' cannot appear in both 'fields' and 'update'), DAT-16 (Field 'labels' cannot appear in both 'fields' and 'update'), TD-57 (Field 'labels' cannot appear in both 'fields' and 'update'), TD-164 (Field 'labels' cannot appear in both 'fields' and 'update')

 Xnip2023-07-26_17-36-07.jpgXnip2023-07-26_17-36-30.jpgXnip2023-07-26_17-36-41.jpg

Looking forward to your reply. Thanks!

 

Amy

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.
July 26, 2023

If you read that error message, it is describing the problem: you have selected to edit the Labels field with the dropdown (at the top) and tried to edit Labels with "More options" / JSON edit.  In a single edit issue action, you may only edit a field one way.

Please unselect the labels field from the top part and try testing again.

Amy Hu
Contributor
July 26, 2023

Awesome! It works. Thanks so much.

Like Bill Sheboy likes this
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.
July 27, 2023

I am glad to learn that helped. 

Please consider marking this question as "answered".  That will help others with similar needs find solutions faster.  Thanks!

Suggest an answer

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

Atlassian Community Events