NOT operator works not as set negation operator

XMLWordPrintable

    • 5.02
    • 1
    • Severity 3 - Minor

      JIRA treats all queries against NULL- or EMPTY-values as false. This is in line with most database systems.

      However, negating such queries with NOT does not work, they remain false.

      How to reproduce:

      1. Create a minimal project MP
      2. create two version V1, V2
      3. create 3 datasets MP-1 to MP-3. All have the field fixVersion. Set the following state:
        • MP-1.fixVersion=V1
        • MP-2.fixVersino=V2
        • MP-3.fixVersion is EMPTY

      Queries with expected answers

      fixVersion = V1 ⇒ {MP-1}
      fixVersion != V1 ⇒ {MP-2}
      fixVersion IS EMPTY ⇒ {MP-3}
      NOT (fixVersion = V1) ⇒ {MP-2,MP-3}
      NOT (fixVersion != V1) ⇒ {MP-1,MP-3}
      fixVersion IS NOT EMPTY ⇒ {MP-1,MP-2}

      Actual results

      fixVersion = V1 ⇒ {MP-1}
      fixVersion != V1 ⇒ {MP-2}
      fixVersion IS EMPTY ⇒ {MP-3}
      NOT (fixVersion = V1) ⇒ {MP-2}
      NOT (fixVersion != V1) ⇒ {MP-1}
      fixVersion IS NOT EMPTY ⇒ {MP-1,MP-2}

      This a) unexpected and b) requieres very ugly queries when you try to filter out subtasks of released issues.

      References:
      My Question on SO: http://stackoverflow.com/questions/28671796/jira-how-to-search-for-all-issues-that-do-not-contain-a-specific-value
      My support request: JSP-221541

              Assignee:
              Unassigned
              Reporter:
              Jan Kurella
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: