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.
Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...
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!
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