Forums

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

JQL for issue with approvals null

Josip Šćirek November 9, 2017

How I can filter issues that don't have approvals? field empty (No approvers selected).

firefox_2017-11-09_15-20-35.pngfirefox_2017-11-09_15-22-18.png

5 answers

1 vote
Jack Brickey
Community Champion
November 9, 2017

@MoroSystems Support, the "is" operator is not supported for Approvals field.

@Josip Šćirek, the only thing I can suggest right off is to use the "pending()". If I find a better solution I will add here.

MoroSystems Support
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.
November 9, 2017

@Jack Brickey thanks for correction, it slipped out of my mind.

Josip Šćirek November 13, 2017

@Jack Brickey Thx for information but "pending()" is not what i need.

0 votes
Andrey Ivanov
Contributor
April 24, 2024

Hello, in order to find the tickets that:

* are "Resolved" and "Closed"

* are NOT "Pending" or "Waiting for approval"

* doesn't matter have or have not approvers

* were NOT approved no matter how

 

No suggested option suits my case.

I have this JQL:

project = PROJ AND ("Approvals[Approvals]" = approved()) AND key in ("PROJ-123", "PROJ-456") order by created DESC

And it returns 1 ticket PROJ-123 which was approved, and is closed and resolved and etc.

I have also these JQLs:

project = PROJ AND NOT ("Approvals[Approvals]" = approved()) AND key in ("PROJ-123", "PROJ-456") order by created DESC
project = PROJ AND (NOT "Approvals[Approvals]" = approved()) AND key in ("PROJ-123", "PROJ-456") order by created DESC
project = PROJ AND !("Approvals[Approvals]" = approved()) AND key in ("PROJ-123", "PROJ-456") order by created DESC
project = PROJ AND (!"Approvals[Approvals]" = approved()) AND key in ("PROJ-123", "PROJ-456") order by created DESC

Not only neither of them work properly (returning PROJ-456), some of them return the same APPROVED PROJ-123 which is absolutely irrational and unbelievable.

0 votes
Sean Roberts June 12, 2020

For this, we use the 'approvers' field in JQL.

Problem: However, by default the field is not searchable, which is why it does not work in JQL.

Solution: A Jira admin can update the custom field to be "searchable". It may require reindexing.

BUT, I agree that `approvals()` should have other functions, such as != or `is not`.

For example, I would like to search for items which have `approvers` but have not been approved. Checking `approval=pending()` is not enough since that only accounts for ones where the current status is an approval status.

And this doesn't work:

  • and not approvals = approved()

You get the same result with 'and' or 'and not'.

0 votes
Richard November 6, 2019

Maybe you can try Approvers (field) instead of Approval (function).

Something like this works on our instance:

status = "Awaiting approval" and Approvers in (EMPTY)

Note 1: "Awaiting approval" is the status of your workflow where the "Approvers" are set.

Note 2: The "Approvers" field is available when "Service Desk" is installed.

Cheers!

Martin Böhme
Community Champion
May 19, 2020

I have Jira Service Desk Cloud and there is no "Approvers" in JQL.

In order to search for a certain approver, you need to query

Approvals = approver("username")

And this way, you can't search for an empty Approver field. Or at least, I don't know how :(

Richard May 19, 2020

Have you tried adding this to your JQL query?

and approver in (EMPTY)

0 votes
MoroSystems Support
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.
November 9, 2017

Hello Josip,

I think you ar looking for "is EMPTY". Please, try this JQL:

status = "Awaiting approval" AND Approvals is EMPTY

Josip Šćirek December 15, 2017

I get message:

The operator 'is' is not supported by the 'Approvals' field. Unknown Approval function. Please use one of supported functions: pending, pendingBy, approved, approver, myApproval, myPending

Like Justin Warwick likes this
Dean Zimmermann
Contributor
June 12, 2018

Yes, same here.  They really need something to indicate approvers is empty, like maybe just isempty() or approvercount() = 0

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events