Forums

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

Need help with a JQL Query for approvers

Anna Debono August 14, 2020

Hi all,

 

I am trying to create a Queue for our approvers. The Queue should show the users only issues which require his/her approval.

 

Till now, I have this: issuetype = Change AND status in ("Awaiting CAB approval", "Peer review / change manager approval")

 

Till this point, it works fine and returns the expected tickets. Once I add AND Approvals = myapprovals() to the end, it says that no matching issues are found.

 

I have also tried all other allowed options such as myPending(), .

 

Why is this not working? What am I doing wrong here?

 

Thanks,

Anna

3 answers

0 votes
Dan Knapton May 4, 2023

I am having this issue also - was there a resolution?  I'm not able to query the Approvers field.  I'd like to send a subscription email to all users that have an Approval in their queue  - ie. = CurrentUser().

0 votes
PJ Wysota
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.
August 14, 2020

I would also suggest some other approach - as You refer to user being approver, he/she should be listed in respective user picker field. So maybe referral to currentuser() would help

Anna Debono August 26, 2020

Hi,

Sorry for the late reply....exams.

 

We do have a custom field of type user picker set up. I have even tried setting myself as an approver. When I run only the first part of the query, I get the list of issues and can see in the issue navigator, that the approvers are listed. Once I add the second part, no issues are found. This is the same for mypending() or even approver(username) and currentuser().

 

KR

Anna

0 votes
Jack Brickey
Community Champion
August 14, 2020

Hi Anna, I would have thought mypending() would do work. What if you drop the status = part just as a test?

issuetype = Change AND Approvals = mypending()

obviously this requires that there are issues pending for you.

or try pending()

just trying to zero in on the behavior here.

Jack Brickey
Community Champion
August 14, 2020

Oh, one more thing... this is JSD correct?

Anna Debono August 26, 2020

Hi Jack,

 

Yes, Service Desk. As mentioned below, any combination added to the original query results in no issues found.

 

KR

Anna

Suggest an answer

Log in or Sign up to answer