Forums

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

Labels inheritance : multiple labels from array

BAILLEUL LOIC February 16, 2022

I'm trying to setup label inheritance on my tasks.

 

For a single label, it works wonder :

JiraAutomationEpicLinkLabels.jpg

 

But when my Epic has multiple Labels is doesn't work, I'll get "Label1, Label2" and 2 issues :

it tries to create a single label instead of 2 seperate labels.

even that fails, as there is a space (The label 'Label1, Label2' can't contain spaces. (labels))

 

If I translate that in some simple code I'd need :

foreach label in issue.Epic Link.Labels

            issue.Labels.add(label)

 

But how can I do that in Jira Automation ?

Remark : I'm not sure if it is possible to set my issue Label equals to my Epic Labels, but that's not what I'm trying to do, as my users should be able to set new labels specific to their issue that are not present in the Epic.

1 answer

1 accepted

3 votes
Answer accepted
Pramodh M
Community Champion
February 16, 2022

Hi @BAILLEUL LOIC 

Why smart value when you have option of copying it directly from Parent issue

Screenshot_2022-02-16-20-38-54-62.jpg

Let me know if it works

Thanks,

Pramodh

BAILLEUL LOIC February 16, 2022

That's perfect didn't see the option :)

 

Still interrested in knowing of to make a foreach work in Jira Automation as I'm sure I'll need it someday but this solve my question ;)

Like Pramodh M likes this
Pramodh M
Community Champion
February 16, 2022

Hi @BAILLEUL LOIC 

We would need advanced option when we need to copy multiple values for the same field.

I will explore on the same and post it here 🙂

Suggest an answer

Log in or Sign up to answer