Forums

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

how do i exclude a status on one issue type only in a filter query

Joakim Wöntner November 10, 2021

i want to be able to filter out closed and verified status on only bugs. this is my current filter.

project = XXXX AND issuetype in (Bug, Epic, Task, "Bug (Sub-Task)", Sub-task) AND "TYP: Team[Dropdown]" = "XXXXXX" ORDER BY Priority DESC
Ranking

Any advice how to do this ?

4 answers

3 accepted

3 votes
Answer accepted
Nic Brough -Adaptavist-
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 10, 2021

You probably want to add a clause for 

and not (issuetype = Bug and status = verified)

The brackets here are critical, if you miss them when adding that to your query, it won't do what you expect.

I think I'd probably start with:

project = XXXX AND issuetype in (Bug, Epic, Task, "Bug (Sub-Task)", Sub-task) AND "TYP: Team[Dropdown]" = "XXXXXX" and not (issuetype = Bug and status = verified) ORDER BY Priority DESC
Ranking
3 votes
Answer accepted
Sebastian Krzewiński
Community Champion
November 10, 2021

Hi @Joakim Wöntner 

 

You need to use OR in your query. It should looks something like this:

project = XXXX AND ((issuetype in (Bug) and stastus not in (Closed, Verified)) or issuetype in (Epic, Task, "Bug (Sub-Task)", Sub-task)) AND "TYP: Team[Dropdown]" = "XXXXXX" ORDER BY Priority DESC
Remember to use brackets to "close" OR. Wihtout that you will get more issues than you expected.
tristan.cruickshanks
Contributor
April 20, 2023

FYI:  typo - stastus not in (Closed, Verified)) 

2 votes
Answer accepted
Grigory Salnikov
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 10, 2021

Hi @Joakim Wöntner 

Try something like this:

project = XXXX AND ((issuetype in (Epic, Task, "Bug (Sub-Task)", Sub-task) OR (issuetype = Bug AND status not in (Closed, Verified)) ) AND "TYP: Team[Dropdown]" = "XXXXXX" ORDER BY Priority DESC

If I got the idea right 

tristan.cruickshanks
Contributor
April 20, 2023

FYI:  typo - stastus not in (Closed, Verified))  - (sorry meant for above reply)

0 votes
Joakim Wöntner November 10, 2021

Thanks guys got the bracket thing now :) thats how you do the link.

Grigory Salnikov
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 10, 2021

You are always welcome!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events