Just trying out a listener with script runner. Basically took the example given by @Jamie Echlin [Adaptavist]. Compiled it and put class under /var/atlassian/application-data/jira/scripts/test
package test
import com.atlassian.jira.event.issue.AbstractIssueEventListener
import com.atlassian.jira.event.issue.IssueEvent
import org.apache.log4j.Category
class ThemedStoryListener extends AbstractIssueEventListener{
Category log = Category.getInstance("ThemedStoryListener")
@Override
void workflowEvent(IssueEvent event) {
log.warn "Event: ${event.getEventTypeId()} fired for ${event.issue} and caught by ThemedStoryListener"
}
}
Listener is found and all of that. editing an issue and I see the following in the JIRA log:
/rest/api/2/issue/UAT-8/comment [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event '[com.atlassian.jira.event.issue.IssueEvent@3d732518[issue=UAT-8,comment=com.atlassian.jira.issue.comments.CommentImpl@47de9fd9,worklog=<null>,changelog=<null>,eventTypeId=6,sendMail=true,params={eventsource=action, baseurl=http://localhost:8080},subtasksUpdated=false], SingleParameterMethodListenerInvoker{method=public void com.onresolve.scriptrunner.runner.ScriptListener.workflowEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.onresolve.scriptrunner.runner.ScriptListener@1c41e604}]' from the invoker 'java.lang.RuntimeException: no protocol: null'
No clue as to what the problem is. Anybody got an idea?
JIRA version is: 6.3.7
Script runner version is: 3.0.7