Query returning wrong results

Rajeev Iyer May 2, 2017

project = "XXXX" AND issuetype != Epic AND component != none AND Status was Done during ("2017/05/01" , "2017/07/31")

 

picks all the results prior to even 1st Jan. What is wrong with the query?

1 answer

0 votes
Jira Admin May 2, 2017

Try using:

(After ("2017/05/01") And Before ("2017/07/31"))

instead of During.

Rajeev Iyer May 2, 2017

:-(  Does not work..

Manoj Arora May 25, 2017

Hi Rajiv,

I had a similar issue too. I think there is no issue with the date but rather with the way Jira understands the not equal relational operator (!=). I am not 100% sure on why it happens, to be seems like a Jira bug. Anyways you should try a reverse logic something like this -

project = "XYZ" AND issuetype in (Epic, Story, Improvement) and (component in ( 'ABC','Whatever','Impediments','People','Process','Program','Sprint Review',,'Teams', "Tools & Technology ") or component is Empty) ## and add any other codition you want to

the point is instead of saying component !=none (as in your case), say component = << everything else>>

I hope this works, atleast it did for me. But I agree it is not logical in the first place that why your query did not work.

Thanks!!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2017

It's not a bug, but it's not intuitive for humans.

When you ask about the values of contents of a field, you need to look at the content first.  The question "is the colour field red?" works ok when your field has red in it, or green, or has no value at all.  But when you ask "is the colour field not red?", you'll get what you expect when it's red or green, but it can't answer when there is no colour there.  So it fails the test.  Humans expect it to succeed because we usually (wrongly) equate "no answer" with "abscence".

The thing to do is catch it explicitly.  You can do "component = <<everything else>>", but in most cases, you probably want to say "component is not empty"

Suggest an answer

Log in or Sign up to answer