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

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

If you have more than one issue types 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 - Getting issue details... STATUS  

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:

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

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

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:
issuetype in (<ID-Zypher>, <ID-Xray>)

For example: issuetype in (10300, 10400)

  • Alternatively, change the issuetype names to unique and different





Last modified on Apr 23, 2021

Was this helpful?

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