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

Adding Multiple Account IDs To the Request Participants Field

Jun Koo
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!
September 1, 2022

I'm currently following this https://community.atlassian.com/t5/Automation-questions/So-close-Add-multiple-accountID-Strings-to-User-Picker-Multi/qaq-p/1857730 to add multiple @mention users into the Request Participants field. The only trouble is that I can't seem to get this smart value into a JSON array or a comma separated list like the person in the guide did. Here's what my inputs and outputs looks like:

Input: @UserA@UserB

Condition: If: Compare two values - {{issue.comments.last.body}} contains \[~accountid:.+\]

Then Create: {{issue.comments.last.body.match("(\[~accountid:.+\])").remove("[~accountid:").remove("]")

Output: 62a74956f8cf79079d6f3f5 61e707b338911c0768543139

Desired: [62a74956f8cf79079d6f3f5, 61e707b338911c0768543139]

Did Atlassian change the way the match function work since the guide was posted? 

1 answer

0 votes
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 28, 2022

Hi @Jun Koo -- Welcome to the Atlassian Community!

I believe the part you are missing is to split the result on spaces, and then add the commas.  You could also use the asJsonObject() function, as described in the post you linked to.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events