Hello, I am getting issue with an automation adding users mentioned in a comment to a custom field named 'Participants'. The following is the configuration of the automation:
Trigger = All comment
Then Create Variables to extract account_id in the comment
-Name: CommentUsers
- Value: {{issue.comments.last.body.split(" ").match("(accountid:.*)]").remove("accountid:")}}
Then Advanced Branch: For each smart value
- Name: varAddParticipants
- Value: {{CommentUsers.split("[-,; ]")}}
Then Add action > Edit Issue field > More option > JSON
{
"update": {
"Participants": [
{
"add":{
"id":"{{varAddParticipants}}"
}
}
]
}
}
But if I mention 2 users, A and B, then the automation adds user A first, then removes user A, then add user B
So the actual result is only user B is added, while expected result is both user A and B are added.
Please advise how to add all users. Thank you!
Hi Sam, thank you. I already managed to configure the automation. It turns out that I should not use Branch. I remove Branch and it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For your custom field "Participants" - What is the data type? User picker (single user or multiple users) or the field is just text field? Please advise.
One idea is to update the local variable to contain all the users, and only then edit your issue's custom field.
Hope this helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Technology Applications Team
Viasat Inc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Joseph Chung Yin , thanks for looking into this. the 'Participant' field is the user picker, multiple users.
Could you please help to guide me how to update the varAddParticipants to contain all the users? And which step is it? Is it before or after the Advanced Branch?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.