Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation: set labels dynamically

sacha_rouzkhosh December 29, 2023
Hi everyone,
I need to set dynamic labels for tasks, but so far, I can't get it right.
Here is what I need:
I set an automation to create children when an Epic is created.
Epic (has fix version)
  • Task A/B
  • Task D/C
When the tasks A/B and D/C are automatically created, I need to set their labels like:
  • Labels Task A/B = [{Epic fix version}_A, {Epic fix version}_B]
  • Labels Task D/C = [{Epic fix version}_D, {Epic fix version}_C]
Any idea about how to set labels for tasks created during an automation based on the Epic fix version and concatenated with some strings?

1 answer

1 accepted

1 vote
Answer accepted
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 29, 2023

Hi @sacha_rouzkhosh

You can use the create variable action ((link) and combine it with smart values to get a new string.  Here is the link to the smart values: 

- Text functions: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/

- smart values overview: https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/

I hope this helps

Bill Sheboy
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.
December 29, 2023

Hi @sacha_rouzkhosh 

Adding to Fabian's answer:

I recommend first writing the smart value expressions to the audit log before trying to set the label values.  That will help confirm they work as you expect, and isolate any problems so they can be fixed first.

Kind regards,
Bill

Like Fabian Lim likes this
sacha_rouzkhosh January 3, 2024

Hi,

Thanks a lot, actually I wasn't using directly the smart value into the field "labels" thinking it will be used as a string.

Thanks also @Bill Sheboy I didn't know we can add data into the audit log. It helps me a lot ;)

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events