How to search for Epics with an empty Name or which Name is not matching the Issue Summary

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

The JQL search that comes with Jira out-of-the-box has some limitation when it comes to performing search using the Epic Name field. This article provides some suggestions on how to search for Epics for the 2 use cases listed below, which cannot be performed with the native JQL search:

  • Use Case 1: Searching for Epics for which the Epic Name field is empty
  • Use Case 1: Searching for Epics for which the Epic Name field does not match the Summary field

Environment

Jira Software Server/Data Center 8.0.0 and any higher version.

Use Case 1: Searching for Epics for which the Epic Name field is empty

Due to the bug JSWSERVER-21533 - Getting issue details... STATUS , it is currently not possible to search for issues of type Epic, for which the Epic Name field is empty. When using the following JQL query, it will not return any result even though there are issues which match this condition:

"Epic Name" is empty


For this reason, to search for Epics which Epic Name field is empty, it will be necessary to use a different method. The workaround below provides a way to search for such Epics directly in the Jira Database.

Workaround

The following SQL query 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' 
	)
);

Use Case 2: Searching for Epics for which the Epic Name field does not match the Summary field

The JQL functions that ship with Jira out-of-the-box do not include a way to perform field comparison. For this reason, our recommendation is to use a paid 3rd party add-on, which provides more advanced JQL query functions.

Workaround

Install the paid 3rd party add-on JQL Search Extensions for Jira - the JQL extensions in your Jira application, which comes with the JQL function fieldsHaveSameValue that can perform field comparison.

Once the add-on is installed, you can follow the steps below:

  1. Open the Issue Search page in Jira
  2. Run the following JQL query:

    issue not in fieldsHaveSameValue("summary", "Epic Name") and issuetype = Epic


Last modified on Nov 7, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.