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

Auto approve for repeated approvers

Tony Hernandez March 28, 2022

Hello JIRA Community,

I have a use case where an employee raises a ticket with a two-level approval configured issue type.

Our requirements are:

Approver #1 is the user Manager (user assigns on the ticket)

Approver #2 is the VP who approves most funding requests (Admins assign - we're working on automating this) -

Update: Approver #2 step actually prompts a "Group of users" that happens to just have our VP. This is important to know since our Condition method changes to Advanced when looking up UserGroupPicker

What we're trying to accomplish via JIRA Automation is:

For any given Two-level approval issue

If Approver #1 = Approver #2

Then approve Step#2 if Step#1 is approved

Thank you for your help!

2 answers

1 accepted

1 vote
Answer accepted
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 28, 2022

Do these approval stages take place in the same status or is Approver 1 in one status and the second approval is in another status within the same flow?

This will help you better understand how to build a basic automation rule.

Thinking about the scenario that each approval is in a different status, you can put together something very simple, like this here:

68.PNG

Assume that the first approval scenario transitions the issue to a status, so use the "Issue transitioned" trigger.

Use the condition to compare if the value where the "Approver 1" fpo added is the same field where the "Approver 2" is.

Then use the auto approval feature.

But I believe you will get better results after you first finish the second approver scenario you commented on.

Let me know if I can help you with anything else.

Tony Hernandez March 28, 2022

Hi Fernando, thank you for your reply.

The Approvers are in different approval stages. See my workflow screenshot below.

I'll give that automation a try :)

image.png

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 28, 2022

Hey Tony!

Great!

That way I believe it won't be difficult for you to set up this automation.

In automation for approver 2 use the trigger:
Issue Transitioned:
FROM > Waiting for Approval
TO: Wiating for funding approval;

Follow the same idea of the conditions that are in the print and test
If you have difficulties, let us know here ;)

Tony Hernandez March 29, 2022

Hi Fernando,

I realize I said Manager #1 = Manger #2 but I just realized I have to verify if Manager #1 belongs to Approver #2 (which is a group). In this case, the below screenshot you gave me wont work.

image.png

Is there a way to check if the manager in approval #1 belongs to the Approver Group in phase 2 approval?

Thank you!

Tony

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2022

@Tony Hernandez 

Hey Tony!

It is possible, but you will have to use advanced JQL features for this.

See how to do it:

In the second pass condition, change the condition to "JQL CONDITION" and try something along these lines:

"Manager 1[User Picker (single user)]" in membersOf("site-admins")

That is, I'm saying that the user entered in the "Manager 1" field is inside the "site-admins" group.

See the screen:

69.PNG

It worked perfectly for me :)

Fernando

Like Tony Hernandez likes this
Tony Hernandez March 29, 2022

Fantastic! I spent 2 hours in Advance JQL but I am no expert, I couldn't figure out the membersOf("GroupName") part of things. For anyone following:

Conclusion... The goal was to auto-approve a step IF the previous manager already approved this ticket. The advanced JQL checks if Manager of approval #1 exists in the Group of Approvers for approval #2.

image.png

Thanks Fernando for your help!

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2022

Hahaha, now you know, man!

Good job!

Like Tony Hernandez likes this
Tony Hernandez March 29, 2022

All you! :D

Manoj Kumar Emmadi November 20, 2023

Hi , what version of "Automation for Jira" you used here?

I have the same requirement and I could not find the "Action" to "Approve/Decline" a request automatically if approvers match.

I am using Jira Service Management - 5.2.0 and "Automation for Jira" plugin version : 9.0.3.

Please help me on this.

Best Regards,

Manoj.

Manoj Kumar Emmadi November 20, 2023

I am not able to find "Approve/Decline" action in my Automation rules.

I have the similar requirement and need to auto approve the approval if the approver is repeated or matches.

Can advise on this please?

Manoj Kumar Emmadi November 20, 2023

approve.PNG

1 vote
Karyna Tyrnavska _SaaSJet
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 26, 2022

Hi, @Tony Hernandez ! As an alternative, you can try Business Process Manager add-on, developed by my team.

You can add approvals to your order. So, when Approver 1 - user Manager approves the task, it goes to approver 2 - Admin.

image.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events