Forums

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

create more labels from one pageProperty

Bernd Winger
January 30, 2026

hello,

i have create one rule to create labels from pageProperty. in my Test create any variables:

variable: myHtml
{{ page.body.storage.substringAfter("Bereich</p>").substringAfter("<td").substringAfter(">").substringBefore("</td>").replaceAll("(?i)<br\\s*/?>", ",").replaceAll("(?i)</p>\\s*<p>", ",").replaceAll("<[^>]+>", "").replaceAll("\\s*,\\s*", ",").trim }}

 

Result: Windows 10,Windows 11,Server 2022,Server 2023,Server 2024,Server 2025

 

Next stept create Cariable make lowerCase:

variable: myWert

{{ myHtml.toLowerCase() }}

 

Result: windows 10,windows 11,server 2022,server 2023,server 2024,server 2025

 

Next step, create a string with labels with comma separet

 

Funktion log:

Variable Split: '{{ myWert.replaceAll(",\\s*", ",").replaceAll(" ", "_").replaceAll("([^,]+)", "bereich_$1") }}'

 

Result: Variable Split: 'bereich_windows_10,bereich_windows_11,bereich_server_2022,bereich_server_2023,bereich_server_2024,bereich_server_2025'

 

create Variable: myLabel

{{#myLabelsRaw.split(",")}}bereich_{{.trim().toLowerCase().replace(" ", "_")}}{{/}}

 

Result: 

'bereich_windows_10,bereich_windows_11,bereich_server_2022,bereich_server_2023,bereich_server_2024,bereich_server_2025'

 

 

in the next steppt i will create any labels:

bereich_windows_10

bereich_windows_11

bereich_server_2022

bereich_server_2023

bereich_server_2024

bereich_server_2025

 

how cnn i do, my testcase for this:

function: create label

{{#myLabel.split(",")}}{{.}}{{/}}

result: fail

 

{{ myLabel }}

result fail

 

Fail test in german:

Fehler beim Hinzufügen der ungültigen Stichwörter:
Trace ID: c05e9b5d-782c-40f7-89e7-9785e8afb4dc::00::c05e9b5d-782c-40f7-89e7-9785e8afb4dc

 

can you help me ?

 

best regard 

Bernd

 

3 answers

1 accepted

1 vote
Answer accepted
Bernd Winger
February 2, 2026

hello,
i found a way to create label with comma separated list


Screenshot 2026-02-02 102848.png

for example: myWert = "Liste 1,Liste 2,Liste 3"

in the branch split this string to
Liste 1
Liste 2
Liste 3

component create variable: myLabel
in next Step eleminate " " and put the text befor "Liste 1"

bereich_{{myLabelTmp.trim().replace(" ", "_")}}

and in last component add label
{{myLabel}}

 

this is all.

Tomislav Tobijas
Community Champion
February 2, 2026

Nice! Thanks for sharing @Bernd Winger 🙌

0 votes
Tomislav Tobijas
Community Champion
February 2, 2026

Hi @Bernd Winger ,

I know there's this bug related to automation: AUTO-328: Automation Error: The label 'JIRA AUTOMATION' can't contain spaces. (customfield_xxxx)) 

As stated in the cause:

  • When adding/setting the labels field on an issue through automation, it currently assumes that a smart value will resolve to a single value.
  • If you are trying to add multiple labels through automation by assigning values to a label field through a variable, It will resolve the multiple labels into a single value. It is considering the "space" in between the labels and making it a single value and you will end up with the error "The label X can't contain spaces" in the automation audit log.

Not sure if this is strictly related to what you're experiencing (based on the trace ID you've shared), but it's something to keep in mind.
Regarding that support ID, you could share it with the official support team to maybe take a look 👀

Cheers,
Tobi

0 votes
Marc -Devoteam-
Community Champion
January 30, 2026

Hi @Bernd Winger 

Which action are you using as in Automation there is no create label action and there is not API endpoint to create labels.

Also labels can only exist if used or added to a page.

Suggest an answer

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

Atlassian Community Events