Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-76482

Inaccurate JQL search results when using IS EMPTY operator with duplicate fields

    XMLWordPrintable

Details

    Description

      Atlassian Update: 20 May 2021

      Hi everyone,

      We have rolled out the fix to all customers.
       
      Thanks for your patience and understanding.

      Kamil Grinholc
      JIRA JQL Search team

      Atlassian Update: 14 May 2021

      Hi everyone,

      Thank you for voting and watching this issue over the last few weeks. We have read your comments and recognise the problem this has caused.
      Today we have started rolling out the fix and we are planning to progressively roll it to the whole production with urgency. 
       
      Thanks for your patience and understanding.

      Kamil Grinholc
      JIRA JQL Search team

      Issue Summary

      Searching for some project scoped fields with IS EMPTY operator gives inaccurate results. 

      Steps to Reproduce

      1. Have at least two custom fields with the same name (e.g. Component) and scope to different projects or between global and project scope (e.g. custom field 10000 scoped to project A and custom field 10001 scoped to project B)
      2. Try to find issues from project A that don't have Component field set
      project = A AND Component IS EMPTY
      

      OR
      The issue is also experienced when only one custom field is present but a context is applied to limit the custom field to certain projects.

      Expected Results

      Search checks value only of Component field scoped to given issue (project).

      In our example search should return issues from project A that don't have value in Component field that is scoped to project A (custom field 10000). Issues from project A that don't have value in Component field 10001 should be ignored as that custom field is scoped to project B.

      Actual Results

      Search checks checks all Component fields (ignores that some of them are not in project scope).

      In our example search currently returns all issues from project A as they don't have value in Component field that is scoped to project B (10001).

      Workaround

      Refer in your JQL search to the custom field by id, ie:

      project = A AND cf[10000] IS EMPTY
      

      instead of

      project = A AND Component IS EMPTY
      

      To find id of custom field scoped to given project use GET /rest/api/3/field resource.

      Attachments

        Issue Links

          Activity

            People

              kgrinholc Kamil Grinholc
              kgrinholc Kamil Grinholc
              Votes:
              15 Vote for this issue
              Watchers:
              28 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: