Forums

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

Trying to post a 1 line text field into multiple labels

Marc van Niekerk
Contributor
March 3, 2023

HI,

 

I have seen a few examples dotted around here on how to convert text fields to labels and been trying a few of them but for some reason none of them give the desired result.

In some cases I still get the "Label can't have spaces" error, and substituting spaces works, but then I end up with a single label containing all items.

For example. I have a customfield that has itemA, itemB, itemC

In my Jira automation I created a variable that did a split: {{issue.customfield_11111.split(",")}}

I then set the label field with the variable.

This failed because of the space after each , but even if I removed that the same error appeared.

I then thought about first setting a variable that substitutes the space: {{issue.customfield_11111.replace(" ","_")}} and then create a following variable that would split: {{Variable1.split(",_")}}

This still gave me the space error.

As a result I am capable of creating a single label with itemA,_itemB,_itemC but no matter what I tried I cant get 3 individual labels.

It might be that I am just being really silly and have missed something trivial but any help much appreciated

 

2 answers

1 vote
Ivan Lima
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.
March 5, 2023

Hi, @Marc van Niekerk. Welcome to the Atlassian Community.

Please have a look at https://community.atlassian.com/t5/Jira-Software-questions/Automation-to-add-labels-based-on-text-present-in-summary-or/qaq-p/1920308, which will likely help you to review your current configuration as it handles similar automation you're looking for.

Cheers,
IL.

Marc van Niekerk
Contributor
March 6, 2023

Thanks will have a look. I had not seen that one so that might do it. will comment once investigated

Like Ivan Lima likes this
0 votes
Horváth Kálmán
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!
August 22, 2023

Hi!

I'm having the same issue, did you found a solution for that?

 

Thank you!

Marc van Niekerk
Contributor
August 22, 2023

Suggest an answer

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

Atlassian Community Events