Pie chart and project overview showing incorrect status count in JIRA
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
Problem
Pie chart gadget and Status Summary at Project Overview shows incorrect status count for a given issue status.
Diagnosis
This KB article may be useful if the problem shows the following characteristics:
- There is a missing status in both Pie Chart and Status Summary
- The missing status is being accounted in the status with incorrect number of issues
The inconsistency can be verified by a JQL search, since the search will return the correct number of issues for a given state.
The following screenshots were taken when the problem was in place:
The following screenshots were taken after the problem is resolved:
Cause
For some unknown reason there are two status with the same sequence number in the issuestatus database table.
Workaround
Each sequence number needs to have its own sequence number. Select the one of the doubled status and change it's sequence number to a number not used for any other status.
The following SQL query should solve the problem:
-
UPDATE issuestatus SET sequence=(SELECT max(sequence)+1 FROM issuestatus) WHERE pname=<STATUS_NAME>;
Please change <STATUS_NAME> in the above query to the correct status name you want it's sequence to be updated.
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.