Velocity Chart showing different project data

nagesh_munagaluri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2019

velocity chart.PNG

i see some other project in my board and some board it is showing zero value. i assumed it is a bug according to  JSWSERVER-13783, JSWSERVER-12805. i see some comments it is not resolved in 8.0 jira version. can you recommend any solution 

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 24, 2019

Hello Nagesh,

Welcome to Atlassian Community!

Indeed, if you have moved any issues of your current project to a different Sprint in a different board(project) as described in the bug, you are indeed being affected by it.

As you can see in the bug, we are currently working to get it fixed, although we have an applicable workaround now:

P.S: It requires direct DB manipulation so PLEASE make sure to backup your DB and test this in dev or stage before moving these changes to a production instance...

Step one grab the offending issues: 

So we take the offending sprint that is showing up in the velocity report and search to see if there are any issues that are in the current project butshouldn'tbe listed as part of that sprint. 

JQL: Sprint = sprint 

This will return a list of issues, in my case it's TAG-24 that I transferred from the sourceproject:

This is pretty blatant in my example, so compare these results to your board filter to be safe before moving forward, now on to the mitigation. 

Step Two remove historical reference of old sprint from affected issues: 

Now that we know which sprint is causing this let's look at the history in the DB: 

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
inner join app_user au on cg.author = au.user_key
WHERE cg.issueid=(select id from jiraissue where issuenum = 24 and project in (select id from project where pname = 'tagetproject')) 
order by 1,3,4;

This will return something like this:

We know that sprint 17 the sprint that is showing up erroneously, so let's kill the value from changitem, this is the first item listed so we'll kill that item:

delete from changeitem where groupid=10294;
delete from changegroup where id=10294;

Step Three remove the sprint custom field value:

We now need to delete the old sprint from the custom value for this issue, you can grab the issue id from last query, in my case it's 10182.
We also need the sprint's custom field ID, we can get that from the GUI by navigating to custom fields and editing the sprint field:

Now that we have that we can determine what value to delete:

 select * from customfieldvalue where issue=10182;

I know I need to remove sprint 17 from this issue and I know my custom field id is 10104, so I'll remove that entry.

 delete from customfieldvalue where id=10307;

Step 4 Reindex the Project:
At this point we reindex the issue's project, and voila, no old sprint info in the report

Let me know if it works for you.

Suggest an answer

Log in or Sign up to answer