Hi,
We have recently upgraded Jira to 7.0.11 and few groovy scripts were not working in the new update. I did check the groovy script source code for errors causde by the changes to Jira API and fixed them, but still the ScriptRunner is throwing an error whenever I try to run the script.
Error from running the script:
Error
No signature of method: com.nimblestorage.jira.PopulateQaContactListener.main() is applicable for argument types: ([Ljava.lang.String;) values: [[]] Possible solutions: wait(), wait(long), find(), any(), wait(long, int), init(java.util.Map)
Log from the Script Listener:
Time (on server): Wed Apr 12 2017 14:23:09 GMT-0700 (Pacific Daylight Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2017-04-12 14:23:09,610 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2017-04-12 14:23:09,611 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: com.nimblestorage.jira.PopulateQaContactListener
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java_util_List$get$4.call(Unknown Source)
at com.nimblestorage.jira.PopulateQaContactListener.findQaContactForIssue(PopulateQaContactListener.groovy:166)
at com.nimblestorage.jira.PopulateQaContactListener.syncQaContact(PopulateQaContactListener.groovy:126)
at com.nimblestorage.jira.PopulateQaContactListener.workflowEvent(PopulateQaContactListener.groovy:90)
at com.atlassian.jira.event.issue.IssueEventListener$workflowEvent.call(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.listeners.CustomListener.doScript(CustomListener.groovy:138)
Please tell me how to debug such error so that I can fix this issue.
Thanks in advance.