How to update the Approver via an Approval field using Jira Automation in team-managed projects
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
Currently, Jira Automation does not support user-picker fields in 'Edit issue' action team-managed projects. The feature request is : AUTO-421 - Better support for using Automation in Next Gen / team-managed Jira projects: bugfixes, support for custom issue types, show what project custom fields are for, display User Picker fields from Team Managed projects
The workaround is to use the Advanced fields section in Jira automation to update the Approval via an Approval field.
Solution
This automation rule will update the approver of a ticket
In the Service Project, go to Project Settings → Automation.
Click on Create rule
Set the trigger as Issue Created
Set the action to Edit issue
Click on More actions
In the Additional fields section, the following JSON needs to be added.
1 2 3 4 5 6 7 8 9
{ "update": { "<fieldName>": [ { "add": { "accountId": "<accountID of the user to be selected>"} } ] } }
Here, <fieldName> = approval field name. For eg. if the approval field name = NextGen Approver, then <fieldName> = NextGen Approver
accountID = Account ID of the user that needs to be updated as the approver.
Steps to find the accountID of the user
Go to Settings >User Management > Users
Click on the required user.
Copy the account ID from the URL as, for example:
https://admin.atlassian.com/s/xxx-xxx-xxx/users/0010eea0e010x0000xx
For the above example, the JSON will look like:
1 2 3 4 5 6 7 8 9
{ "update": { "Nextgen Approver": [ { "add": { "accountId": "0010eea0e010x0000xx"} } ] } }
Was this helpful?