Revert all the values in multi-user picker custom field using Automation for Jira
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
There is a customer use-case to set a multi-user custom field within an automation rule using smart values and to update the multi-user picker field back to the original values. This article will explain and provide the solution to achieve this use-case.
Environment
Jira Cloud.
Solution
We can create an automation rule to revert the values in a multi user picker field to the original ones using Advanced Edit in the Automation rules. Please note that the solution below also covers the scenario if more than 1 user value is changed in the multi user picker field:
Add the trigger as the Field value changed and select the multi user picker field from the drop down.
Next, we can use the Edit Issue action and add the below JSON payload in the Advanced options section:
1
2
3
4
5
6
7
8
9
{
"update": {
"<<fieldName>>": [
{{#deletedFieldChange.valueIds}}
{ "add": {"id":"{{.}}"} } {{^last}}, {{/}}
{{/}}
]
}
}
Was this helpful?