Forums

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

How to search for issues that DON'T have a certain array of statuses?

Mark Kenny June 3, 2020

I'm trying to do this:

reporter = currentUser() AND status NOT IN (closed, done, completed, resolved, not required) ORDER BY updated DESC, key ASC, summary ASC, created DESC

but I'm getting the error:

Error in JQL Query: Expecting either a value, list or function but got 'not'. You must surround 'not' in quotation marks to use it as a value. (line 1, character 76)

I know I can do this with

AND status != "closed" AND status != "done" ... etc

but this seems very verbose.

We're on Jira v7.13.5.

1 answer

1 accepted

2 votes
Answer accepted
Callum Carlile _Automation Consultants_
Community Champion
June 3, 2020

Hi @Mark Kenny 

You can leave the filter in the same format for the most part, the issue is that the status not required should be in quotation marks - filtering any custom field, status, resolution etc. consisting of more than than one word must always be in quotation marks. So the filter should work as:

reporter = currentUser() AND status NOT IN (closed, done, completed, resolved, "not required") ORDER BY updated DESC, key ASC, summary ASC, created DESC
Mark Kenny June 3, 2020

Thanks! Should've spotted it was the second "not" that it was complaining about :)

Suggest an answer

Log in or Sign up to answer