Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-61841

JQL behavior for "not in" doesn't include empty list

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Won't Do
    • None
    • None
    • 2
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      We're searching for issues that don't have labels in a specified list.

      At first we used this query:

      project = BLAHBLAHBLAH and (labels not in (bucket-1, bucket-2, bucket-3))
      

      And we were pleasantly surprised to find only 16 issues, which we reviewed and triaged.

      Then we got a report from a developer saying there were a bunch of issues we missed.

      I had a hunch and tried this query:

      project = BLAHBLAHBLAH and (labels not in (bucket-1, bucket-2, bucket-3) or labels is empty)
      

      Sure enough there were over 600 items returned.

      Somehow the NOT IN keyword doesn't take into account null values. This needs to be clearly documented. It probably makes sense at the SQL level but it is totally counterintuitive at the end-user level.

            Unassigned Unassigned
            edf2323a88df jason_s
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: