Gadgets Showing Incorrect Issue Count for Versions

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

Symptoms

A gadget's issue count when filtering by Versions does not match the actual issues returned when viewing the filter.

Cause

From the database end, tickets are linked to versions that may not actually exist.

Resolution

This will have to be resolved from the database side:

Backup the database before attempting any changes.

  • First verify if there are issues associated with non-existing versions:

  • Query to see if any defined Fix Versions do not actually exist:

    1 select count(*) from nodeassociation where sink_node_id not in (select id from projectversion) and association_type = 'IssueFixVersion';
  • Query to see if any defined Affects Versions do not actually exist:

    1 select count(*) from nodeassociation where sink_node_id not in (select id from projectversion) and association_type = 'IssueVersion';
  • If either of the above query return results, then that is verification of issues associated with non-existent versions.

  • At this point, a DELETE statement can be run to remove these invalid entries.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.