Forums

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

Running a filter on multiple statuses

Colum McAndrew
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.
April 26, 2021

I'm trying to run a search filter to list:

  • All tickets on a specific project
  • That do not have one of two statuses
  • Contain a specific label.

Here's the filter being used:

project = "<PROJECTNAME>" AND labels = <LABEL> AND status != ("STATUS1", "STATUS2") order by created DESC

This returns an error despite all the indications that adding the statuses inside brackets should work.

If I run a search on each status individually, it works as expected. Can you help me with the syntax required to get the results in a single list. Many thanks.

1 answer

1 accepted

0 votes
Answer accepted
Kevin Johnson
Community Champion
April 26, 2021

Hi @Colum McAndrew ,

  • project = "<PROJECTNAME>" AND labels = <LABEL> AND status in ("STATUS1", "STATUS2") 
  • project = "<PROJECTNAME>" AND labels = <LABEL> AND (status = "STATUS1" or status = "STATUS2")

Any of these should probably work.

Cheers, Kevin.

Colum McAndrew
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.
April 26, 2021

Thanks @Kevin Johnson The later example worked. 

BTW I meant to say that I wanted to exclude two statuses, not include. My bad, and I amended the original post. For the benefit of anyone following this, it was just a simple case of using status != rather than status =.

Like Kevin Johnson likes this
Kevin Johnson
Community Champion
April 26, 2021

= instead of != should work and you can also use "not in".

Cheers, Kevin.

Like Colum McAndrew likes this

Suggest an answer

Log in or Sign up to answer