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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL for issue with approvals null

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

4 answers

1 vote
Jack Community Leader Nov 09, 2017 • edited

@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.

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

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

Hello Josip,

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

status = "Awaiting approval" AND Approvals is EMPTY

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

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

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!

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 :(

Have you tried adding this to your JQL query?

and approver in (EMPTY)

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'.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Desk

The Complete Guide to Atlassian for ITSM

Hi Atlassian Community! This is Teresa from the Atlassian team. My colleague Paul Buffington @Buff and I are excited to share a brand new ITSM resource we’ve created – "The Complete Guide to At...

2,258 views 14 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you