Forums

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

Querey for 'Bugs' is including everything.

Craig Maxwell-Brown
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2022

I have the following query that i'm trying to use in a filter. I've highlighted the particular issue in bold. 

project = CP2 AND issuetype = Bug AND status in ("In Analysis", "In Development", "In Test", "New Ticket", Reopened) AND Component
not in ("Reporting") or component is EMPTY ORDER BY created DESC

 

If i remove the bold text, i get the overall report i'm after - all bugs at those statuses. but i'd also like to exclude any bugs with the component 'Reporting'.

However if i just use 'component not in ("Reporting")' i only get tickets that have components which that are not 'Reporting'. all those with 'empty' components are also excuded. Bit of research suggests i need 'component is EMPTY' for blank component bugs, but if i include that 'or' statement, it just brings back every issue type - bug, story, tasks etc. 

How do i word that JQL to get 

* All bugs

* including blank components

* excluding any components that contain "Reporting"? 

 

Any help is much appreciated. 

2 answers

2 accepted

1 vote
Answer accepted
John Funk
Community Champion
January 24, 2022

Hi Craig - Welcome to the Atlassian Community!

Try using this:

project = CP2 AND issuetype = Bug AND status in ("In Analysis", "In Development", "In Test", "New Ticket", Reopened) AND (Component
not in ("Reporting") or component is EMPTY) ORDER BY created DESC

1 vote
Answer accepted
Mikael Sandberg
Community Champion
January 24, 2022

Hi @Craig Maxwell-Brown,

Welcome to Atlassian Community!

Your query is missing "()" around the component section, and that is why you get all issues that doesn't have a component set. Try this query, that should get you what you are looking for: 

project = CP2 AND issuetype = Bug AND status in ("In Analysis", "In Development", "In Test", "New Ticket", Reopened) AND (Component
not in ("Reporting") OR component is EMPTY) ORDER BY created DESC

Suggest an answer

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

Atlassian Community Events