How to Add multiple users to a Custom field when they are tagged in a comment in the Jira Automation.
Hi @Seenivasan K ,
As @Aaron Pavez _ServiceRocket_ said, you need to extract the User from the comment and then add it to the custom field, so the rule is:
I am adding some screenshots of the testing of the rule on my test instance, in my case, I added the users to a field called Approvers:
Hopefully this helps you build your Automation rule.
Regards,
David
Thanks for the reply @David Freitez
Can you please elaborate branching and create variable in this automation, as I am facing Error.
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.
Above attached screenshots are my automation, but it adds only one user in the customfield. I want to add multiple users dynamically. @David Freitez @Aaron Pavez _ServiceRocket_
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To better understand this can you tell us;
- Is the custom field a user picker field?
- A text field?
- A picklist?
Regards
Aaron
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.
First, we can use this reply from @Bill Sheboy to extract the ID from the user mentioned in the comment
Then you can add the value using this JSON body:
{ "update": { "userpickerfieldhere": [{ "add": {"accountId":"{{accountvariablehere}}"} }] } }
Now if you want to append, you need to use:
{{fromString}} {{toString}}. More on that here:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
That should put you in the right track. Let us know how it goes!
Regards
Aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding to the suggestions from @Aaron Pavez _ServiceRocket_
In the linked post Aaron provided, that scenario was to Add Watchers, and so branching was appropriate.
But you are trying to select values in a multiple-select user field, correct?
If so, branching is a bad idea: advanced branching executes in parallel and asynchronously, processing in no particular order or timing. This mean your rule's edits could repeatedly collide trying to edit the field.
Instead, once you have identified the users to add, find the current values, merge them with the new ones, and perform a single edit using JSON.
Kind regards,
Bill
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.