Find all issues which were approved by the user

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 26, 2021

I have an automation for cascade approval system where multiple approvers approve. The issue is not seen non before nor after the approval to the approver. How do I find the issues for particular approver to bring ability of listing the issues where the current user was approver and approved it?

There is also an automation to comment the issue on approval with text saying Approved by {{issue.assignee.displayname}} maybe this helps to find all such issues?

2 answers

1 accepted

0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2021

Hi Javanshir - you should be able to run a query like:

project = JIRA and "Approvers[User Picker (multiple users)]" = currentUser()

where JIRA is the project you want to see. 

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2021

Hi John,

Nope, this didn't work. In the fields I see the following fields:

Approver

Approver 1

Approver 2

Approver 3

Approver 4

Approvers

I've changed the JQL to the following:

project = "Project name" AND "Approver[User Picker (single user)]" = currentUser() AND "Approver 1[User Picker (single user)]" = currentUser() AND "Approver 2[User Picker (single user)]" = currentUser() AND "Approver 3[User Picker (single user)]" = currentUser() AND "Approver 4[User Picker (single user)]" = currentUser()AND "Approvers[User Picker (multiple users)]" = currentUser()

This brings no matching results for the employee that is approving constantly.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 27, 2021

What do the values look like for a single row (issue) where the current user has approved it. One that you KNOW for sure that he/she approved it. 

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2021

This is requested for a cascade approval tickets system, where a custom field is used and then a variable comes into an action. Maybe this sheds more light?

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 31, 2021

I am afraid that doesn't help any. Can you answer my last question? If there has been an issue that is approved, what do the values look like in the fields for that issue for the Approver field(s)?

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2021

If the Approver, Approver 1, Approver 2, etc. field/s is containing an employee the automation rules apply when the approvers move the issue to appropriate statuses.

There is no special value for an approved issue only automated comment by employee name to the comments section as mentioned in the initial post.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2021

project = "Project name" AND "Approver[User Picker (single user)]" = currentUser() AND "Approver 1[User Picker (single user)]" = currentUser() AND "Approver 2[User Picker (single user)]" = currentUser() AND "Approver 3[User Picker (single user)]" = currentUser() AND "Approver 4[User Picker (single user)]" = currentUser()AND "Approvers[User Picker (multiple users)]" = currentUser()

Change the ANDs between approvers to OR - like this:

project = "Project name" AND ("Approver[User Picker (single user)]" = currentUser() OR "Approver 1[User Picker (single user)]" = currentUser() OR "Approver 2[User Picker (single user)]" = currentUser() OR "Approver 3[User Picker (single user)]" = currentUser() OR "Approver 4[User Picker (single user)]" = currentUser() OR "Approvers[User Picker (multiple users)]" = currentUser())

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 7, 2021

Great, that's what I thought should be done to make this work. Thanks for helping out!

Like John Funk likes this
0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 26, 2021

Hi @Javanshir Mustafayev _ HIT 

Is this a Jira Service Management (JSM) project?  If so, you may be able to use:

project = myProject and approvals = myApproval()

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-functions/#Advancedsearchingfunctionsreference-myApprovalmyApproval--

Best regards,

Bill

Javanshir Mustafayev _ HIT
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2021

Hello Bill, no it's not a JSM project, anyway thanks for your input.

Like Bill Sheboy likes this

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