import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import org.apache.log4j.Category
def groupManager = ComponentAccessor.getGroupManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def group = groupManager.getGroup("ITOPS - Devops Team")
Getting below error while executing the above code. Let me know how to fix the issue.
java.lang.NoClassDefFoundError: groovy/lang/GroovyObject at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.lang.ClassLoader.defineClass(ClassLoader.java:642) at org.codehaus.groovy.runtime.ProxyGeneratorAdapter$InnerLoader.defineClass(ProxyGeneratorAdapter.java:926) at org.codehaus.groovy.runtime.ProxyGeneratorAdapter.<init>(ProxyGeneratorAdapter.java:191) at groovy.util.ProxyGenerator.instantiateDelegateWithBaseClass(ProxyGenerator.java:225) at groovy.util.ProxyGenerator.instantiateDelegateWithBaseClass(ProxyGenerator.java:193) at groovy.util.ProxyGenerator.instantiateDelegate(ProxyGenerator.java:185) at groovy.util.ProxyGenerator.instantiateDelegate(ProxyGenerator.java:181) at org.codehaus.groovy.runtime.DefaultGroovyMethods.asType(DefaultGroovyMethods.java:15547)
Try it in the script console first, but please provide the Jira and ScriptRunner versions as well.
I m using scriptrunner version 5.2.1 and Jira 7.3.8.
Below is the screenshot when i run in console. I m not at groovy. Please let me know what was the error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure you're running nothing more than that code? When I enter an existing group in our Jira it works correctly. I don't think there's anything wrong with your code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.