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.