Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21533

The JQL query "Epic name is empty" is not working and always returns 0 result

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.0.1, 8.0.0, 9.0.0
    • Epics
    • None

      Issue

      When using the following JQL query to search for Epics for which the "Epic Name" is empty, no results are returned:

      "Epic Name" is empty
      

      Steps to replicate

      1. Create a Jira Software project
      2. Create an issue in the project of type Story
      3. Change the issue type to Epic. Note that you will not be asked to enter an "Epic Name" even though this field is mandatory for issues of type Epic
      4. Notice that the issue was moved to the Epic type, without any Epic Name set:
      5. Open the issue search page, and use the following JQL Query:
        "Epic Name" is empty
        

      Expected results

      The search should returns all the Epic for which the "Epic Name" field is empty.

      Actual results

      The search does not return any result:

      Workaround

      Run the following SQL query which will search for issues of type Epic for which the Epic Name field is empty:

      select concat(concat(P.pkey,'-'),I.issuenum)
      from jiraissue I
      join project P on P.id = I.project
      where issuetype = (select id from issuetype where pname = 'Epic')
      AND I.id not in (
      	select issue from customfieldvalue
      	where customfield = 
      	(
      		SELECT id from customfield
      		where customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-epic-label' 
      	)
      );
      

        1. Step2.png
          Step2.png
          176 kB
        2. Step1.png
          Step1.png
          144 kB

              Unassigned Unassigned
              jrey Julien Rey (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: