Search filter displaying results for incorrect project

diana.pereira January 2, 2020

Hi!

I want to create a search filter for a particular project (let's call it PX1 for the query purposes) and use an OR argument in the environment field. This field is free text and can contain any words and/or be blank.

When I search using just this query

project = PX1 AND issuetype = Bug AND status in (Open, "Development in Progress", "Code Review", "QA In Progress") AND environment ~ prod OR environment ~ UAT

only bugs from the project PX1 are being displayed, however, when I add the OR argument with the "EMPTY" field, results from other projects are also displayed

project = PX1 AND issuetype = Bug AND status in (Open, "Development in Progress", "Code Review", "QA In Progress") AND environment ~ prod OR environment ~ UAT OR environment is EMPTY

How can I solve this issue?

1 answer

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 2, 2020

Regarding other projects you need to add parentheses...

project = WC1 AND (issuetype = Bug AND status in (Open, "Development in Progress", "Code Review", "QA In Progress") AND environment ~ prod OR environment ~ UAT OR environment is EMPTY)
diana.pereira January 2, 2020

Thanks @Jack Brickey. Editing my comment as I incorrectly applied the wrong search query!! Apologies...

 

It works!!! Awesome. :)

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 2, 2020

Great!

diana.pereira January 2, 2020

I spoke too soon... Now I'm getting not only bugs but also stories, sub-tasks... the lot. It seems that although the environment query is working, the issuetype is not...

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 2, 2020

If you only want bugs then use this

project = WC1 AND issuetype = Bug AND (status in (Open, "Development in Progress", "Code Review", "QA In Progress") AND environment ~ prod OR environment ~ UAT OR environment is EMPTY)

basically move the bug argument outside of () 

diana.pereira January 2, 2020

Awesome! I think I get the logic now.

 

I've changed it for:

project = WC1 AND issuetype = Bug AND status in (Open, "Development in Progress", "Code Review", "QA In Progress") AND (environment ~ prod OR environment ~ UAT OR environment is EMPTY)

 to only get bugs with the above statuses and got the number that I expected. YAY!

 

Thank you so much!!

Suggest an answer

Log in or Sign up to answer