Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to search for tickets I approved

Ismael Jimoh October 28, 2024

Good day team,

I am looking for a query that finds all issues I approved. The thing is approval happens on various statuses and I would like to only find the tickets where I clicked the approve in the JSM ticket.

I came across queries where they referenced the approver field

approver = currentUser() or approver was currentUser() and status in (statuses after potential approval)

I have scriptrunner and saw there was meant to be an isuse function like:

issueFunction in approvedIssues() AND approver = currentUser()

Does anyone have a suggestion how I could achieve the following?

Thanks.

 

1 answer

1 vote
Jim Knepley - ReleaseTEAM
Atlassian Partner
October 28, 2024

Hi @Ismael Jimoh welcome to the community.

I think your problem might be the boolean order of operations. Try:

(approver = currentUser() or approver was currentUser()) and status in (statuses after potential approval)

See Precedence in JQL queries in https://confluence.atlassian.com/jiracoreserver084/advanced-searching-979408017.html

 

Ismael Jimoh October 29, 2024

Hi @Jim Knepley - ReleaseTEAM  ,

Firstly, thanks for your reply.

The problem is we could have multiple approvers per state but require just one approval.  For example,

Lets say we have 5 Issues need approval to go to *In Progress* from one of *User A or User B* but we want only the list of tickets approved by User A.

From what we have, this isn't working because the approver it shows also issues approved by User B because for the User A was in the approver field at the time.

Any assistance would be much appreciated.

Thanks.

Jim Knepley - ReleaseTEAM
Atlassian Partner
November 13, 2024

@Ismael Jimoh 

Could you please rephrase your question in more detail?

Ismael Jimoh January 17, 2025

Hi @Jim Knepley - ReleaseTEAM ,

Sorry for the late reply.

To clarify what I need, it is as follows.

Imagine there are JSM tickets where I am an approver with other users, I would like to find the tickets where I was the one who clicked on the Approve or Reject button.

I was wondering if there was a JQL query that actually shows these issues.

Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events