I have installed Script Runner and configured as below but I am getting below error when I copy script in "Script Runner" and ran it.
Steps followed to configure Groovy in JIRA.
1. Installed "Script Runner" in JIRA
2. Downloaded groovy runner and copied groovy-all-1.7.11.jar and groovyrunner-1.7.13.jar to /JIRA_Install/atlassian-jira/WEB-INF/lib
3. Restarted JIRA.
Navigate to Script Runner tab and ran below script.
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.project.ProjectManager
ProjectManager manager = ComponentManager.getInstance().getProjectManager()
return "There are ${manager.getProjects().size()} projects"
Below error has thrown for above script. I tried with other scripts also but for any scripts below exception only throwing.
This is urjent requirement, please resolve ASAP.
Cause:
java.lang.NoSuchMethodError: com.onresolve.jira.groovy.GroovyRunner.getComponentManager()Lcom/atlassian/jira/ComponentManager;
Stack Trace: [hide]
java.lang.NoSuchMethodError: com.onresolve.jira.groovy.GroovyRunner.getComponentManager()Lcom/atlassian/jira/ComponentManager; at com.onresolve.jira.groovy.GroovyRunner.runFile(GroovyRunner.java:74) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:50) at com.onresolve.jira.groovy.GroovyRunner.doExecute(GroovyRunner.java:220) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:82) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:221) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:150) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:153)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.