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

This widget could not be displayed.

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.


This widget could not be displayed.

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 widget could not be displayed.

Versions? Any errors in the log?

Provided samples can be out of date.

This widget could not be displayed.

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 Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

171 views 1 3
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