Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-3969

Creating a Post Function "create sub-task" or "Clones an issue, and links" throws the java.lang.NoClassDefFoundError: com/atlassian/servicedesk/api/NoSuchEntityException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Done
    • 5.6.7, 5.6.7.1-jira8
    • 5.6.9
    • None
    • None
    • Sprint 66
    • 12.9

    Description

      Steps to Reproduce

      1. Create a project and enter some custom fields
      2. Next, open the workflow for the project and create a ScriptRunner Post Function for example for the In Progress transition
      3. Select the Create Sub-Task Option
      4. No need to include any code. For the Fields to copy select All and Update it.
      5. Create a new ticket and give some sample values.
      6. Try to update the ticket from To Do to In Progress

      Current Behaviour

      An exception is thrown as shown below:-

      *****************************************************************************
      2019-11-18 18:01:39,712 http-nio-9191-exec-7 ERROR admin 1081x1380x1 w8lk7o 192.168.0.160 /secure/WorkflowUIDispatcher.jspa [c.o.s.jira.workflow.AbstractScriptWorkflowFunction] Script function failed on issue: POST-1, actionId: 21, file: null
      java.lang.NoClassDefFoundError: com/atlassian/servicedesk/api/ServiceDeskServiceException
      	at com.onresolve.scriptrunner.canned.jira.utils.AbstractCloneIssue.execute(AbstractCloneIssue.groovy:191)
      	at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CreateSubTask.super$4$execute(CreateSubTask.groovy)
      	at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CreateSubTask.execute(CreateSubTask.groovy:141)
      	at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CreateSubTask$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$0.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.ServiceDeskServiceException not found by com.onresolve.jira.groovy.groovyrunner [188]
      	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)
      	... 11 more
      

      Expected Behaviour

      The a sub task is created and the fields configured should be copied.

      For further info, attached is a print screen of the Error message

      Update

      This bug only shows on Servers that:

      • do NOT have Service Desk installed
      • Running a newer version of Jira 
      • And it only appears to happen on the "Create Sub-Task" and "Clones an issue, and links" Post functions after they have been edited at least once.
        So a new post function will work but once you edit it and then publish the new workflow you start getting the stack trace errors shown above

      Attachments

        Issue Links

          Activity

            People

              jechlin Jamie Echlin
              rkumar Ram Kumar Aravindakshan
              Votes:
              4 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: