Strange query results

Eddy Borremans July 2, 2014

In JIRA I am trying to select a subset of issues in order to do some bulk changes. However, my issue search queries give me strange results.

project = SDRD -> returns 120 issues

project = SDRD and component = RTS -> returns 81 issues

project = SDRD and component != RTS -> returns 7 issues where i would expect 120-81=39 issues.

What am i doing wrong?

3 answers

1 accepted

0 votes
Answer accepted
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.
July 2, 2014

It's the difference between "null" and "not what you're looking for".

I suspect

  • you've got 81 issues with RTS as a component.
  • you've got 7 issues with at least one other component, but not RTS.
  • you've got 32 issues with no component set at all

Try (component != RTS or component is empty) - that should pull back 39

rambabu patina
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2014

Hi, Please check with the JQL: project = SDRD and component is Empty. The remaining issues will come.

Eddy Borremans July 2, 2014

@Nic, thanks for your answer, this solved my problem. I will spend the remainder thinking about the exact why ;-)

Eddy Borremans July 2, 2014

Hmmm, it looks like since some issues do not have a component at all, they seem not to be incorporated in the query at all. Apparently 'component != 'RTS' should be read: all issues that have a component and the component is not equal to RTS. From a query perspective this still feels counter intuitive to me. Maybe i should study the internal model of Jira, but for now my immediate problem has been solved. 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.
July 2, 2014

That's not so much a function of Jira as a more general point about data.

We humans tend not to distinguish between "null" and "not X" whereas computers very much have to. To us, it's intuitive that the question "show me everything where the component is not X" should return all the empty lines as well, but that's not how data works.

It's hard to explain that a "simple yes or no question" has three possible answers when the statement itself says that there's only two. There's always Yes, No and no-answer given. I don't know if this is a language thing (I'm English, and to my shame, speak no other languages, so I don't know if questions phrased in other languages might be less fuzzy or less loaded implications)

Obviously, you can change the question to state it explicitly - "if you don't answer, we have to assume you mean "no"". And, you have to do this with the computers as well.

This is not going to change - if you implicitly assume "no includes no-answer", then you lose the ability to find issues where no component has been set. There is a difference between "not x" and "empty/null" and it's a useful one. But we have to remember to be clear about it. And I forget it ALL the time, despite having worked with computers for <mumble> decades.

0 votes
Eddy Borremans July 8, 2014

Question was properly answered by Nic Brough.

0 votes
Eddy Borremans July 8, 2014

Hehe, it's getting academic now, but the underlying issue has intrigued me no end while i was still a computer science student. Too bad i am not that well versed in formal mathematics. First i learned from logics that all statements are either true or not true. Until someone showed me the statement : 'i always lie'. Im not sure if this would fall in the category 'not true' or if we should at a 'indeterminate' value which is neither false nor true. My gut feeling has always told me that basic mathematics cannot properly model these statements, but im sure that by now math has found a way to deal with it. I however, have never been able to get my head around it. In any case it is indeed very important to clearly specify the exact models that are used including assumptions. Unfortunately these systems (JIRA) should of course also be usable by non-math experts. And that I guess is where this whole Q&A feature comes in.

Thanks for your help anyway.

Eddy

Suggest an answer

Log in or Sign up to answer