We have a simple groovy script in our Listeners list that *was* working up until recently. Not sure if anything changed on the Jira server (still looking/working with admins), but we now get this error:
groovy.lang.MissingMethodException: No signature of method: UpdateField.main() is applicable for argument types: ([Ljava.lang.String;) values: [[]]
Possible solutions: wait(), wait(long), any(), find(), wait(long, int), init(java.util.Map)
at com.onresolve.scriptrunner.runner.RunScriptInvoker$run.call(Unknown Source)
at com.onresolve.scriptrunner.runner.AbstractScriptRunner.runScript(AbstractScriptRunner.groovy:170)
at com.onresolve.scriptrunner.runner.AbstractScriptRunner$runScript$6.callCurrent(Unknown Source)
The script:
import com.atlassian.jira.event.issue.AbstractIssueEventListener
import org.apache.log4j.Logger
import com.atlassian.jira.event.issue.IssueEvent
import com.atlassian.jira.issue.Issue
class UpdateField extends AbstractIssueEventListener {
Logger log = Logger.getLogger(UpdateField.class)
'@Overrde
void workflowEvent(IssueEvent event) {
log.setLevel(org.apache.log4j.Level.DEBUG)
Issue issue = event.issue
def key = issue.getKey()
def cmd = ["/bin/script.bash", key]
cmd.execute()
}
}
The groovy script is being called in the Listener list as
/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/com/test/updateIssue.groovy
We're using Jira Server v8.1.0 and ScriptRunner v5.6.15.1-p5.
The ScriptRunner docs say the Heritage Custom Listeners are still valid, so not sure what's going on.
Any ideas? Thanks!