I have been having issues with the script runner for a couple months now. I am adding a post-function script to a workflow transition and when progressing this workflow transition the issue will jump to the next status, however, filters, subscriptions and queries that display this issue will continue to show the old status.
Things to note:
- I am using this script runner on completely custom workflows
- This problem is NOT happening on every workflow transition that executes the script runner
- I have tried moving the order of this execution of the post script to AFTER the issue is reindexed with the database, however, that has proved to be unsuccessful.
- Atlassian support has recommended disabling this addon which seemed to solve the issue
- The script being run is a simple commenter that adds a comment on behalf of the user. The code was actually taken from a sample provided in Script Runner documentation pages.
Any help would be appreciated.
If you are using JIRA 5.1 to 5.2.9, it is possible that you are experiencing a side effect of the new way that IndexManager works. For these versions, Issues are no more indexed by the Index Post-Function, but at the end of the transaction initiated for the Workflow transition.
It means that your scripts are executed with an issue not yet indexed; or changes done by these script are indexed (if indexation initiated in the script) before the indexation initiated by the Index Post-Function.
The issue is already known : JRA-31775.
It may cause error with Script Runner, but also with Auto-Transition.
See details and workaround here.
Since 6.0, the issue is normaly fixed related multiple indexation of the same issue. The indexation doen in the correct order, but always at the end of the Transition Transaction.
If your script makes update on different issues based on value modified by a Post-Function executed in the same transition before your script, you may experience inconsistencies.
For the moment, I always use my Force Indexation post-function.
I did not yet check with latest 6.0.x releases.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs