Update values in multiuser picker field using automation in Jira Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Learn how to add multiple values in multiuser picker fields using automation.
Solution
Appending multiple values using automation
In automation, we can append more values or update existing values in the multi-user picker field through the "Edit work item" action's Additional Field section.
If the multi-user picker value needs to be copied from another custom field/multi-user picker field(i.e, customfield_10148), use the below JSON:
{"update": {
"customfield_10140": [
{{#issue.customfield_10148}}{"add": {"id":"{{accountId}"}}}{{^last}},{{/}}{{/}}
]
}
} If the multi-user picker value needs to be updated from any other source, such as Assets, comments, etc.
Fetch and store the account IDs in the below format in the variable(i.e., useraccountIDs).
"6412f02db05b4e3e7da95eee","638712e6489de2f7f4662b26","63bebcfeeac4f07e3f3bcc61" |
|---|
Use variable {{useraccountIDs}} in the below JSON code to update the values in the multi-user picker field 10140.
{"update": {
"customfield_10140": [
{{#useraccountIDs.split(",")}}{"add": {"id":{{.}}}}{{^last}},{{/}}{{/}}
]
}
} More details about the smart values can be found here.
Was this helpful?