We're updating the issue view to help you get more done. 

GH Charts not picking up stories that have been fast track transitioned on create

Description

*This issue has moved*

This issue has been moved permanently to Adaptavist's Product Support JIRA instance.

All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the
Can't access your account link in order to reset to a new password.

The way GreenHopper works is it goes through quite a few hoops to retrieve the issue status change history. The data is read from Lucene (the classes that interact with the indexes that are created on disk) and it manually matches the incoming and outgoing transition changes to build the status change history. This is done to keep the performance of GreenHopper at an acceptable level.

GreenHopper doesn't expect transitions to happen at the same time and the fast transition functionality within Script Runner is causing change history timestamps to be identical which is breaking GreenHopper. Consequently issues are not appearing on boards when they should be.

Verification

Execute the below SQL to identify problematic issues:

1 2 3 4 5 6 7 8 SELECT pkey FROM changeitem c LEFT JOIN changegroup g ON g.id = c.groupid LEFT JOIN jiraissue j ON g.issueid = j.id WHERE c.field = 'status' AND g.created = j.created;

If it returns issues that are missing from the boards, it is highly likely this is what is causing problems with GreenHopper.

Workaround

The fast transition functionality causes GreenHopper issues to not appear, so will need to be disabled for the projects that GreenHopper uses. After doing so a SQL update can be executed to fix the change history records on the affected issues.

  1. Stop JIRA.

  2. Backup the database with native DB tools or use an XML backup prior to stopping it.

  3. Execute the following SQL:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 CREATE TABLE tmpfoo SELECT DISTINCT j.id FROM changeitem c LEFT JOIN changegroup g ON g.id = c.groupid LEFT JOIN jiraissue j ON g.issueid = j.id WHERE c.field = 'status' AND g.created = j.created; ALTER TABLE tmpfoo ADD INDEX id (id); UPDATE jiraissue j SET created = ( created - INTERVAL 1 second ) WHERE id IN (SELECT id FROM tmpfoo); DROP TABLE tmpfoo;

    This is for MySQL and will need modifying depending upon the DBMS JIRA uses.

  4. Start JIRA and index it.

  5. Verify the issue is in the chart by accessing it.

Environment

None

Status

Assignee

JamieA

Reporter

Andy Grace

Internal Complexity

Unknown

Internal Value

Unknown

Fix versions

Affects versions

2.1.1

Priority

Major