Custom script listener not working after migration JIRA 6.2 => 6.4


I was using the custom listener function in JIRA 6.2 without problem.

Now I am evaluating the migration to JIRA6.4, and my listener won't work => nothing happens nor is logged in the catalina.out.

I'm using the scriptrunner version 3.1.4

My script is a groovy class that extends the AbstractIssueEventListener (like in most examples), and the file is on server in $JIRA_INSTALL/atlassian-jira/WEB_INF/classes/com/mycompany/jira/IssueEditedListener.groovy

package com.mycompany.jira.listeners
import org.apache.log4j.Category
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.issue.util.IssueChangeHolder
import com.atlassian.jira.event.issue.AbstractIssueEventListener
import com.atlassian.jira.event.AbstractEvent
import com.atlassian.jira.event.issue.IssueEvent

class IssueEditedListener extends AbstractIssueEventListener {
   Category log = Category.getInstance(IssueEditedListener.class)
   void workflowEvent(IssueEvent event) {
      log.error "Event: ${event.getEventTypeId()} fired for ${event.issue} and caught by IssueEditedListener"
      [...some other code here...]


Now when I open my custom listener configuration in JIRA, if I enter the name of the class "com.mycompany.jira.listeners.IssueEditedListener" in the "Name of the goovy class" field, I end up with error:Problem loading class/script: groovy.util.ResourceException: Cannot open URL: bundle://165.0:0/null

(same error whatever I put in the field, in fact...)


What is wrong with the configuration? Again, it was working just fine with JIRA6.2.7 and scriptrunner 2.1.17.





2 answers

1 accepted

This widget could not be displayed.

You need to put it under a script root - and refer to it either as com.mycompany.jira.listeners.IssueEditedListener  or com/mycompany/jira/listeners/IssueEditedListener.groovy

Further examples here:

Thanks Jamie, this solved the issue. I saw the "Heritage" Custom Listeners section in, but the point 2) talks about the script roots directory without pointing to the Just adding the hyperlink would help a lot of people I think ;) Regards Gael

Good point, will do. Thanks.

This widget could not be displayed.

I ran into a similar situation after upgrading ScriptRunner.


I used to be able to use the package name followed by the class name like you're attempting. Example: com.custom.MyListener


Now I have to put in the path followed by the file name. Example: ...../jira/scripts/com/custom/myListener.groovy


Try that, hope it helps. I'm interested to know if you get the package name approach to work.

Ran into this problem with my scripts folder too.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

536 views 3 19
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you