This notification should be usefull for any JIRA Administrator who had implemented or want to implement smart workflows.
By smart workflows, I think about Workflows :
- able to interact with with other Workflows
- using Auto-Action capacities of OSWorkflow
Few days ago, I have raised an issue related the new way of JIRA Issue Indexation implemented since JIRA 5.1.
In few terms, the re-index Post-Function does not execute an Issue Indexation, but only send the request to the IndexManager which consumes the requests at the end of OSWorkflow transaction. In some Workflows configurations, these postponed indexations can lead to Indexation inconsistencies. (See details in JRA-33293).
Typical case is the usage of Auto-Action …
As soon as a Transition is qualified as an Auto Action, when OSWOrkflow engine executes it, it is in the same transaction of the initial transition, then each of their indexation request done by the native Re-Index Post-Function are queued and executed only at the end of the transaction. Due to the bug detailed in JRA-33293, the queue of issues to index is drained in a hazardous order, and you can see the Issue’s values of the 1st transition done in last position, and then have the index inconsistent against the value stored in database.
A workaround …
In order to avoid such inconsistencies, and waiting for a fix (perhaps a patch ?) from Atlassian, you can append the Post-Function “Indexation Forced Function” just after the “re-index function” for all incoming transitions to a Step where there are outgoing Auto-Action from this Step.
By example, with the following a Workflow :
- Create > Open
- Open > Triage 1 (Auto) > New
- Open > Triage 2 (Auto) > New
- New > Start Progress > In Progress
- In Progress > Close Issue > Closed
- Closed > Reopen > Open
Where Triage X (Auto) are transitions marked as Auto Action.
You will have to apply the workaround for the Create and Reopen transitions, since the both go to Open step where there are outgoing Auto Action..
Note that, you can encounter similar issue :
- with Fast track transition an issue and Transition parent when all subtasks are resolved groovy scripts, if the concerned transition have conditions based on issue field values.
- with Minyaa Transition Issues Post-Function, if the concerned transition in the linked issues are based on field values of the initial Issue.
I think that we should be able to find other error cases …
|Plugin Name||Alkaes JIRA Plugin Indexation Forced|
Good patch …