I'm running a query that seems simple - give me all tickets less than a week old that are specific issue types OR the issue hasn't yet been identified. The issue category is a custom one, so I'll just use XXX.
The query looks something like this:
project in (AAA, BBB, CCC) AND "XXX Issue Category" is EMPTY OR "MLS Issue Category" in ("Documentation Gap", "Known Error", "Product Defect") AND created >= -1w ORDER BY priority DESC, created ASC
If I run this without the EMPTY phrase, works fine. When I add the EMPTY phrase, whether before or after the in () phrase, it returns basically every ticket in the database.
What am I missing or doing wrong??
Hi @Red Lloyd , I would try throwing a parenthesis around your portions that have the OR statement. Try something like this:
project in (AAA, BBB, CCC) AND ("XXX Issue Category" is EMPTY OR "MLS Issue Category" in ("Documentation Gap", "Known Error", "Product Defect")) AND created >= -1w ORDER BY priority DESC, created ASC
Haha no worries! It definitely can be tricky. The reason that the parenthesis are needed is that the JQL was interpreting your query quite literally as:
look for issues in Project AAA, BBB, CCC and those that have the empty category
OR (the rest of your query) in any project
So basically you have to nest stuff in parenthesis, especially with OR statements so that any criteria you want to carry throughout the entire search, will stick.
Hope that helps! It definitely gets easier with practice (and friends!) :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.