It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ScriptRunner Scripted Field : re-index issue


I want to reindex issues with scripted fields, and implemented the example as described in the Scriptrunner documentation (under "JQL Searches in Script Fields").

When running the code, I get an error

2018-01-26 16:42:04,550 ajp-nio-8009-exec-17 ERROR MMN 1002x4544387x4 1tgasxs /rest/api/2/version/17327 [c.o.scriptrunner.runner.AbstractScriptListener] Script function failed on event: com.atlassian.jira.event.project.VersionReleaseEvent, file: EVSListeners\PLMConfigListener.groovy
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.atlassian.jira.jql.query.IssueIdCollector(org.apache.lucene.index.ReadOnlyDirectoryReader)

 This example worked in the past, but recently we did an upgrade from Jira 7.1.7 to 7.4.3 and Scriptrunner from 4.3.15 to 5.2.2. Do not know if there is a relation...

2 answers

1 accepted

0 votes
Answer accepted

Hi Marc,

The constructor that takes an argument was removed in Jira 7.3.3. You can fix your script by changing line 53 to:

def issueIdCollector = new IssueIdCollector()

Effectively if you remove the parameter the new version of the collector should work as expected.

I hope this helps!

Hi, thanks for your quick help.

Indeed, this solves my issue!

Same issue with the latest script on the adaptavist website and this fix here isn't working. Any idea?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

864 views 6 24
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you