Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,294,016
Community Members
 
Community Events
165
Community Groups

Copy labels from subtask to parent issue

I've seen many examples when a label is copied from parent to sub-task. Is there a way to update the labels on the parent issues when we update the subtask?

3 answers

0 votes
Daniel Ebers Community Leader Sep 08, 2021

Hi @Benjamin

with the easier options available from user interface the labels are likely replaced and overwritten. You need to add them using advanced field edit (using JSON).

There was a previous post which seems to discuss this a bit more elaborate, from what I remember for sub-tasks it was reported to be possible but not so easy:

https://community.atlassian.com/t5/Jira-Software-questions/Automation-rule-to-sync-labels-between-a-JSM-ticket-and-its/qaq-p/1733473

Please note that the scenario was not 1:1 identical.

The core part to probably look for is:
{"update":{"labels":[{{#issue.labels}}{"add":"{{.}}"{{^last}}},{{/}}{{/}}}]}}
In that case the user wanted to copy to sub-tasks - but you would need the other way around. So you need to make sure you adapt parts of the logic, for example like Fabian said to pay attention for the proper branching.

Regards,
Daniel

Thanks for the suggestion! Let me look them up! Need some studying on how this works exactly.

This is good! thanks Fabian, however, my use case is slightly different. E.g. Parent has 4 subtasks, each subtasks has different labels, the Parent should display all the labels within the subtasks. Is that possible?

0 votes
Gaurav Community Leader Sep 03, 2021

Hello @Benjamin 

Welcome to the community!!

Automation rules can be used to achieve this. The rule can be triggered when the label on a sub-task is updated and the value can be copied to the label for the parent.

Please let me know if you have further queries on this.

Kindly accept the response if this helps in resolving the query.

Can you guide me through how I should set up the rules?

Gaurav Community Leader Sep 03, 2021

Hello @Benjamin 

Please navigate to Project settings --> Automation --> Create rule

This will help you create a new automation rule.

Hi @Gaurav ,

Please find the below rule I have created for "Replicate labels from subtask to Parent"

Replicate labels from subtask to parent.PNG

Please help me where I am missing.

I would like to replicate the labels from subtask to Parent.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,166 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you