Update:
I've found a pattern.
Each time I try to edit a Scriptrunner post function in a workflow, this error appears.
Then I have to delete the entire post function setup in the workflow and register it all over again with the change.
After re-creating the post function setup everything works fine again.
I'm not sure if this bug is related to Jira or Scriptrunner... but it's clearly a bug in either of the two. How to correctly report this bug?
Original description:
I have added a post function to a jira transition triggering Scriptrunner CloneIssue function.
It used to work just perfect, but suddenly I started getting some strange errors. I have no idea why it refers to servicedesk suddenly:
2019-12-12 10:49:27,160 ERROR [workflow.AbstractScriptWorkflowFunction]: Script function failed on issue: WIB-2384, actionId: 91, file: null
java.lang.NoClassDefFoundError: com/atlassian/servicedesk/api/NoSuchEntityException
at com.onresolve.scriptrunner.canned.jira.utils.AbstractCloneIssue.execute(AbstractCloneIssue.groovy:191)
at com.onresolve.scriptrunner.canned.jira.utils.CopyIssueWithAttachments.super$4$execute(CopyIssueWithAttachments.groovy)
at com.onresolve.scriptrunner.canned.jira.utils.CopyIssueWithAttachments.execute(CopyIssueWithAttachments.groovy:25)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue.super$5$execute(CloneIssue.groovy)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue.execute(CloneIssue.groovy:132)
at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CloneIssue$execute.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.conditions.CustomScriptCondition$execute.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.AbstractWorkflowCannedScript.execute(AbstractWorkflowCannedScript.groovy:17)
at com.onresolve.scriptrunner.canned.jira.workflow.AbstractWorkflowCannedScript$execute.call(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.workflow.AbstractWorkflowCannedScript$execute.call(Unknown Source)
at com.onresolve.scriptrunner.jira.workflow.AbstractScriptWorkflowFunction$_run_closure1.doCall(AbstractScriptWorkflowFunction.groovy:93)
at com.onresolve.scriptrunner.jira.workflow.AbstractScriptWorkflowFunction$_run_closure1.doCall(AbstractScriptWorkflowFunction.groovy)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl.execute(DiagnosticsManagerImpl.groovy:325)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsExecutionHandler$execute$3.call(Unknown Source)
at com.onresolve.scriptrunner.jira.workflow.AbstractScriptWorkflowFunction.run(AbstractScriptWorkflowFunction.groovy:86)
Caused by: java.lang.ClassNotFoundException: com.atlassian.servicedesk.api.NoSuchEntityException not found by com.onresolve.jira.groovy.groovyrunner [279]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
... 15 more