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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

303 views 1 18
Join discussion

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