Script Runner addon causing issues not to reindex


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.



4 answers

1 accepted

Hi Steven,

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.


0 votes

Versions? Any errors in the log?

Provided samples can be out of date.

Hi Vincent,

I was on 5.2.5 but recently upgraded.

Do you happen to know if this issue still exists in version 6.0+?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,085 views 13 18
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot