How to update the Approver via an Approval field using Jira Automation in team-managed projects
Platform Notice: Cloud - This article 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 : JRACLOUD-75792 - Getting issue details... STATUS
The workaround is to use Advanced fields section in Jira automation to update the Approval via an Approval field.
Environment
Cloud
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.
{ "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 in the screenshot
For the above example, the JSON will look like:
{ "update": { "Nextgen Approver": [ { "add": { "accountId": "557058:4d5ed02e-64b3-4d73-be2b-ba2c4d9c8aa3"} } ] } }