Automation to de-dupe users from Jira multi-user fields with smart values
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
If you use more than one multi-user picker field and want each field's user option list to be unique, Automation can remove users from one field if they're present in certain other fields.
For example, let's say you use three fields simultaneously:
Viewers
Approvers
Developers
Let's use an Automation rule to remove users from Viewers if they exist in either Approvers or Developers.
Solution
Automation rule to de-dupe user lists from fields
To dynamically reference users from the Approvers and Developers fields, you can use smart values. For example, {{issue.Approvers.name
}} will give you the account IDs of users in the Approvers field.
We then use this with a Branch in the automation rule to remove account IDs present in one field from another. Here's an example rule:
Trigger: Field value changed
Select the Viewers field for our example
This could also work using other trigger types
Add a Branch: Advanced Branch
Use the smart value: {{
issue.Approvers.name
}}Set the variable name as “approver”
Inside the branch, add Action: Edit work item
Ignore the "Fields to set" selector
Expand More options
In the Additional fields box, add the following JSON:
{ "update": {"Viewers": [{"remove" : {"accountId": "{{approver}}"} }] } }
This JSON uses the smart value we set as a variable to dynamically remove users from the Viewers field
Add a second Advanced branch to check the Developers field following the same logic
Test the Rule: Use a test task to test your automation rule
Check the audit log for any errors or validation issues.
By following these steps, you should be able to configure your automation rule to remove users from the Viewers field based on their presence in other fields.
Was this helpful?