Jira Agile reports not showing correct data
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
Jira reports (Sprint report , burndown chart..) might show incorrect curves when a ticket has a corrupt workflow transition. For instance, even though tickets were closed during the sprint, we can see that the remaining value doesn't drop.

Environment
8.X
Diagnosis
Check if a ticket has the same transition for instance, we can check if a workflow is inserting 'Done' status as a source and destination transition which is an incorrect state
1 2 3
SELECT * FROM CHANGEITEM WHERE FIELD='status' AND OLDSTRING='Done' AND NEWSTRING='Done';
To get more details on the tickets that might have problems in a specific Sprint, replace SPRINT-NAME and STATUS-VALUE with actual data from your instance, example : sprint 1 and Done respectively
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
SELECT p.pname, p.pkey, i.issuenum, cg.ID, cg.issueid, au.lower_user_name, cg.AUTHOR, cg.CREATED, ci.FIELDTYPE, ci.FIELD, ci.OLDVALUE, ci.OLDSTRING, ci.NEWVALUE, ci.NEWSTRING FROM changegroup cg inner join jiraissue i on cg.issueid = i.id inner join project p on i.project = p.id inner join changeitem ci on ci.groupid = cg.id AND ci.FIELDTYPE='jira' AND ci.FIELD='status' inner join app_user au on cg.author = au.user_key WHERE cg.issueid in (select jissue.id from CustomFieldValue cfv, CustomField cf, jiraissue jissue, project p, "AO_60DB71_SPRINT" ao where cf.cfname='Sprint'and cf.Id = cfv.CustomField and jissue.id = cfv.issue and jissue.project = p.Id and cf.cfname='Sprint' and ao."ID" = CAST(cfv.stringvalue as int) and ao."NAME" like '%SPRINT-NAME%') and NEWSTRING ='STATUS-VALUE' order by 1,3,4;
Cause
There is an extra post-function in Done (or other) causing problem: Set issue status to the linked status of the destination workflow step causing Jira to insert erroneous data in the CHANGEITEM table.
Solution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Stop Jira
Create a database backup
Delete the duplicate status value, in case it's Done status the query would be :
1
DELETE FROM CHANGEITEM WHERE FIELD='status' AND OLDSTRING='Done' AND NEWSTRING='Done';
Start Jira
Run Full reindex
Was this helpful?