Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ScriptRunner Scripted Field : re-index issue

Marc Minten (EVS)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2018

Hi,

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 10.129.0.102 /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
Stephen Cheesley [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2018

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!

Marc Minten (EVS)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 30, 2018

Hi, thanks for your quick help.

Indeed, this solves my issue!

0 votes
Manuel
Contributor
September 30, 2019

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