How to parse field values out of text field and concatenate them with Jira Automation

Tobias
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.
June 3, 2024

Hello together, 

I am currently educating myself in using the remarkable features of Jira automation. 

Currently I want to get specific values out of a text field with a regular structure and concatenate them afterwards. The goal is to get a user list out of a text field and add them as a list via smart values. 

The part of adding a list of usersnames to a multi user picker field is already implemented. For me the different part is how to get the user names out of a text field structure like this: 

Group1|nick, jack, thomas
Group2|benjamin, steven, mike
Group3|franklin, danny 

In this case we want to receive a comma separated user list to create a smart value variable and add assign them to the multi user picker field. 

Is there any possibility to do achive this with smart values?

1 answer

1 accepted

1 vote
Answer accepted
Erik
Contributor
June 19, 2024

Hi @Tobias 

I had a very similar case.
One possible solution is using the match() function.  -> match(".*\|([^|\n]+).*")
 
You can store the result of the match result in a variable with the "create variable" action.
If you'd like to see the output of the match function, use the "log action" function, which prints the result in the audit log.

After this you can reference the variable in a multi user picker field with {{variable_name}}.


Best,
Erik

Tobias
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.
June 19, 2024

Thank you @Erik

this is exactly what I was looking for. Thank you very much!

Like Erik likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.4.21
TAGS
AUG Leaders

Atlassian Community Events