Forums

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

Label Manager custom field, add label from Task to Epic.

Labadie_ Agustin - Contractor
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!
October 14, 2024

Hi community, I´m setting an automation to add a label in a label manager field in a parent issue from the same field in a child issue. I´m not looking for replacing the value/s. I looking to add them to the existing ones.

Automation 1.png
This field doesn´t appear on the Choose field to set dropdown, so I went with More Options. How I have it currently set works only if there is one or less label on each issue.

If there are already two Labels on the parent issue, or there are two labels on the triggerIssue this automation fails. Here are the Audit logs.
Automation audit log.png

The labels are indeed defined as it is the same project, but instead of reading it as two labels it is reading it as one longer label.

Any idea? I think this can also be approach with scriptrunner but I wouldn´t know how to go about it.

1 answer

0 votes
Rachel Wright
Community Champion
March 24, 2026

Hi @Labadie_ Agustin - Contractor , I came across your older question but was interested to see if I could get it to work. I did - with some caveats.

First, I'm using Cloud and you're using Data Center. So, it's possible my solution won't work for you, although the automation functionality was built by the same folks, so I have high hopes it will. Second, it's possible that this didn't work in Data Center back in 2024 but does now. Regardless, here are two ways I got this to work, in case it helps you or someone else doing something similar.

To simulate your use case, I linked a Jira issue (the source issue) to another Jira issue (the destination issue) and manually triggered the automation from the source issue. The source issue contained three different labels. The destination issue contained no labels. I used the standard Jira "labels" field.

Method 1: Selecting the "Labels" field (Jira Cloud)

In this first example, Jira Cloud allowed me to select the standard "Labels" field and use built-in settings to copy the value of the field to another Jira issue. Easy peasy.

automation-copy-labels.jpg

Method 2: Using JSON only (Jira Cloud)

For the second example, I pretended that the "Labels" field was not selectable (like you mentioned) and did it with a small snippet of JSON code instead.

Code snippet I used:

{
     "fields": {
     "labels": {{triggerIssue.labels.asJsonStringArray}}
     }
}

Note: {{triggerIssue.labels}} will not work, as this field may contain multiple selections stored as comma-separated values. Splitting them into an array did the trick! I assume this might be related to the problem you encountered.

automation-copy-labels2.jpg

I don't know if any of this will help or if you even still need help, but regardless, I sure had fun trying it!

So thanks,

Rachel Wright
Author, Jira Strategy Admin Workbook

Suggest an answer

Log in or Sign up to answer