Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automate an Approver based on Workflow Approval Process

John Lombardo November 20, 2023

Hello,

We have a Workflow that involves getting approval in order to move onto the next stage of the Workflow.

jira.PNG

 

Is there a way to automatically assign the approver using Jira Automation or another means?  I have tried to setup an Automation user the Approver field as shown in the picture below, but it is not assigning the approver where the Work Flow will accept that approval and move forward to the next step in the flow.

jira automation.PNG

This automation puts an approver in the details column, but the Workflow is still saying an approver needs to be selected.

approver-0.PNGapprover-1.PNG

Is there a way to make the automation fill in an approver for Workflow approval?

3 answers

1 accepted

0 votes
Answer accepted
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2023

Hi @John Lombardo 

This looks like a Team-managed Project, correct? As far as I know, it won't use the standard "Approvers" field which Jira has out of the box.

AFAIK it uses a special Approvers field which is part of the Workflow - you can also create custom Approver fields...

  1. Go to Project Settings > Request Types
  2. Select a request type which includes the approval step in the workflow
  3. Press Edit Workflow
  4. Select the status where the approval is required
  5. Select the approval rule
  6. Click Next
  7. Select the "Approver field" section
  8. Type in a different word - eg. Approvers Custom - and it'll give you the option to create a new "approver" custom field, which can be added to the agent screen

...but even with a new custom field and its ID (I got this via https://<your domain>.atlassian.net/rest/api/3/field), and the rule successfully populating the user, it still doesn't add it the Approvers section.

I'd contact Atlassian Support and get some clarity on how those fields work. If you do contact them, let us know how it goes :)

Ste

0 votes
John Lombardo December 6, 2023

Following up on this.  The Automation did not work, but it was a team-managed project.  Not sure if that effects it.

I made the desk a company-managed project, like it should have been, and the automation works as intended

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2023

Hi @John Lombardo,

Welcome to Atlassian Community!

If you look at the warning message it is expecting a user to be added to the Approver field, not the Approvers. So It looks like you have two or more fields for approvers. 

John Lombardo November 20, 2023

Hi @Mikael Sandberg

Thanks!

 

Yes I added that field after I couldn't find where in Jira Automation to add an approver to the Approver Field inn the workflow approval.  I was hoping if I added Approvers to details it would populate.

 

Is there a way to do this?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2023

The approver field should be like any other fields, just use the edit issue component in the automation to add them. It is not showing up as an option then you can always use the advanced option to update the field, something like this:

{
"update": {
"customfield_12345": [{
"add": {
"id":"<Atlassian Id>"
}
}]
}
}

Note that when you do it via the advanced option you have to use the Atlassian Id for the user that you want to add as the approver. 

John Lombardo November 20, 2023

Thanks.  I will test and follow up.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events