Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Search filter displaying results for incorrect project Edited

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 Community Leader Jan 02, 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)

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

 

It works!!! Awesome. :)

Jack Community Leader Jan 02, 2020

Great!

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 Community Leader Jan 02, 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 () 

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
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you