Jira 5.2: Stale issue object is being re-indexed after workflow transition

Benu Gupta February 28, 2013

We are in the process of upgrading our Jira instance from 4.3.4 to 5.2 and we have encountered an issue similar to https://jira.atlassian.com/browse/JRA-31775 in our testing environment.

Before the upgrade, the issues were being re-indexed fine after the workflow transition with custom post functions to update the issue fields. But after the upgrade, once an issue takes a transition with custom post-function, the issue has the correct status in the database but shows an old one in Issue Navigator which is definitely a re-index issue. After debugging through the atlassian jira 5.2 source code several times, I noticed the changes done to the way the issues were being re-indexed during a workflow transition. In 5.2, the indexing is held for the duration of the transition and all the re-index requests are added to a queue of type collection (Set<Issue>). At the end of the transition, the indexing is released and at that point all the issue object held in the queue are indexed. But as highlighted in the bug raised (JRA-31775), Set does not change if the element is already present in it.

We believe the fix suggested in JRA-31775 will solve the issue that we are facing but since we are not in a position to wait for 5.2.9 release, can you please provide us with a patch to fix the bug? We will update to a later version with the bug fixed as and when its released.

3 answers

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2013

Fair enough, I see what you mean.

0 votes
Benu Gupta March 11, 2013

Thanks for your response Jamie. The fix is part of 5.2.9 which has not been released yet else we would have upgraded to that version. The fix oulined in JRA-31775 looks pretty simple and I have customised the Jira source code to incorporate that fix which has solved the problem we were having with indexing. But it would given us more confidence if we had a patch or the source files that were fixed for this bug before going live with 5.2 upgrade just to ensure that we won't see any other index related issues in production.

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2013

They seem to be recommending people contact support for this, but can't you just download the version with the fix and the previous version, and create your own patch file? Should be obvious which class it is.

Suggest an answer

Log in or Sign up to answer