groovy script is not working in upgraded 6.3.13 while the same was working on jira 3.13 version

We are getting  getting following error in logs while we are trying to run a groovy script.

 

groovy.lang.MissingMethodException: No signature of method: static com.atlassian.jira.event.issue.IssueEventManager.dispatchEvent() is applicable for argument types: (java.lang.Long, com.atlassian.jira.issue.IssueImpl, com.atlassian.jira.crowd.embedded.ofbiz.OfBizUser, null, null, null, java.util.HashMap, java.lang.Boolean) values: [10879, NEWLTA-347, sethuraj:3, null, null, null, [eventsource:workflow], ...]

 

 

code we are using is as follows:

if(business.value == 'ABSA'){
log.debug("inside")
log.error("inside ABSA Business")
//IssueEventManager.dispatchEvent(10877, updatedIssue,
Long eventId = 10879
IssueEventManager.dispatchEvent(eventId, updatedIssue, ManagerFactory.getWorkflowManager().getRemoteUser(transientVars),comment, null, changeGroup, params, true);
//IssueEventManager.dispatchEvent(10879, updatedIssue, appUser.getDirectoryUser(),comment, null, changeGroup, params, true);
}

 

1 answer

A lot has changed between JIRA 3.13 and JIRA 6.3.13 and that class has changed with it.

The error is pretty clear : the method no longer exists.

And if you take a look here: https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/event/issue/IssueEventManager.html you can see alternatives.

So you'll need to adapt your Groovy Script.

Cheers,

Peter

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,769 views 18 21
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