Jira issue search doesn't fetch all issues when there are duplicate issue types

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

If you have more than one issue type with the same name (example: "Test") then JQL search doesn't show all the issues sharing the same issue type name.

Diagnosis

While searching for issues with the issuetype of this duplicate entry (both on Simple and Advance) Jira will only return the issues from one of the issuetypes. For example, if you run a JQL like issuetype = Test then it returns either of the issue types but not both.

Check the issue type scheme for the affected project(s) from the issue type scheme, you'll find two different issue types with the same name.

Cause

JRASERVER-72340 - Java API allow creating duplicate issue types

Although Jira has the check in place which will stop you from creating two issue types with the same name from UI or REST API. However, it doesn't have the same validation when the issuetype is created via Java APIs. We've seen this situation arising from third party add-ons like Zephyr, Xray etc. which creates issue types called "Test". Now depending on which plugin was installed first and created the issue type first, the entry of the issue type in the issuetype table will be made. Jira will only show the issues of the lower issuetype ID. Run the following SQL query to check the IDs of the duplicate issue type:

1 SELECT * FROM issuetype WHERE pname like '%Test%';

ℹ️ If you wish to further validate if there are any more such duplicate issuetypes, you can use this SQL query:

1 2 3 4 5 6 7 8 SELECT pname, COUNT(*) count FROM issuetype GROUP BY pname HAVING count(*) > 1;

If this query returns any row(s) please go ahead and proceed with the Solution section.

Solution

  • Change the JQL filter to search with the unique IDs from the SQL query above:

1 issuetype in (<ID-Zypher>, <ID-Xray>)

For example: issuetype in (10300, 10400)

  • Alternatively, change the issuetype names to unique and different

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.