Hello,
I'm trying to adapt a groovy post function script to a Behaviours script. My post function script works without any problems, however, when I try to adapt it to a Behaviours script, I'm getting errors that the following classes can't be resolved:
com.atlassian.jira.issue.operation.IssueOperations com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItem com.atlassian.jira.issue.fields.screen.FieldScreenRenderer com.atlassian.jira.issue.fields.screen.FieldScreenRendererFactory
Compilation failure: startup failed: Script1.groovy: 19: unable to resolve class com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItem @ line 19, column 1. import com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItem ^ Script1.groovy: 20: unable to resolve class com.atlassian.jira.issue.fields.screen.FieldScreenRenderer @ line 20, column 1. import com.atlassian.jira.issue.fields.screen.FieldScreenRenderer ^ Script1.groovy: 18: unable to resolve class com.atlassian.jira.issue.operation.IssueOperations @ line 18, column 1. import com.atlassian.jira.issue.operation.IssueOperations ^ Script1.groovy: 21: unable to resolve class com.atlassian.jira.issue.fields.screen.FieldScreenRendererFactory @ line 21, column 1. import com.atlassian.jira.issue.fields.screen.FieldScreenRendererFactory ^ 4 errors
I need the four classes in order to programmatically get all fields on the creation screen in order to prefill them.
Based on the advice in this question, https://answers.atlassian.com/questions/21421/behaviours-plugin-groovy-scripts-unable-to-resolve-class-com-atlassian-jira-issue-context-projectcontext, I asked our admin to add the packages to Import-Package section in the atlassian-plugin.xml but he had no luck:
I’ve tried several variations, but no change allowed Jira to load the plug-in. The error message is usually something like this:
2014-08-08 09:30:46,555 localhost-startStop-1 ERROR [atlassian.plugin.loaders.ScanningPluginLoader] Unable to deploy plugin 'com.onresolve.jira.groovy.groovyrunner' from 'Unit: C:\data\plugins\installed-plugins\plugin_1653577282920400456_groovyrunner-3.0.1.jar (1407514983584)'.
2014-08-08 09:30:46,555 localhost-startStop-1 ERROR [atlassian.plugin.loaders.ScanningPluginLoader] Because of the following exception:
com.atlassian.plugin.util.validation.ValidationException: The key is required: <bundle-instructions> <Import-Package>com.atlassian.jira.issue.operation.IssueOperations, com.atlassian.jira.issue.fields.screen.FieldScreenRenderLayoutItem, com.atlassian.jira.issue.fields.screen.FieldScreenRenderer, com.atlassian.jira.issue.fields.screen.FieldScreenRendererFactory</Import-Package></bundle-instructions>
Could anyone please help me with this or point me in the right direction? I'm using: Jira 6.2.7 ScriptRunner 3.0.1.
Thanks,
Linh
Hi @Linh Tran,
Any luck in getting this solved. We are facing same issue.
Please share your approach for the above mentioned issue in order to solve this.
Thanks,
vikash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.