Hi,
We have below code that runs fine on script console but when i add the same in inline script in scriptunner job it throws the below errors. Can anyone please suggest how to resolve this?
Code#
The script could not be compiled:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: file:/shared/home/scripts/com/lamrc/JiraUtils/LamJiraUtils.groovy: 418: unable to resolve class WithPlugin for annotation @ line 418, column 9. @WithPlugin("com.atlassian.servicedesk") ^ file:/shared/home/scripts/com/lamrc/JiraUtils/LamJiraUtils.groovy: 419: unable to resolve class PluginModule for annotation @ line 419, column 9. @PluginModule ^ file:/shared/home/scripts/com/lamrc/JiraUtils/LamJiraUtils.groovy: 420: unable to resolve class RequestTypeService @ line 420, column 28. RequestTypeService requestTypeService ^ file:/shared/home/scripts/com/lamrc/JiraUtils/LamJiraUtils.groovy: 423: unable to resolve class RequestType @ line 423, column 21. RequestType getRequestType = requestTypeService.getRequestTypes(currentUser, reqQ).getResults().get(0) ^ 4 errors
It's the compile error on the class LamJiraUtils.
Seem it missing import for:
- WithPlugin
- PluginModule
- RequestTypeService
- RequestType
The simple thing is that, you can try to bring all the code from LamJiraUtils to the inline script, then continue to check and execute the script.
Thanks for your prompt response
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.