Hello!
I'm trying to load a Field Screen Scheme... But i don't succeed at all.
It's impossible to load the class by using:
def fieldScreenSchemeManager = ComponentAccessor.FieldScreenSchemeManager
Error:
groovy.lang.MissingPropertyException: No such property: FieldScreenSchemeManager for class: com.atlassian.jira.component.ComponentAccessor
I found another way to load the class but it doesn't work:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.screen.FieldScreenSchemeManager
FieldScreenSchemeManager fieldScreenSchemeManager = ComponentAccessor.getComponent(FieldScreenSchemeManager.class);
def targetFieldScreenScheme = (long) 11018
def oldFieldScreenScheme = FieldScreenSchemeManager.getFieldScreenScheme(targetFieldScreenScheme)
I get this error:
Message:
groovy.lang.MissingMethodException: No signature of method: static com.atlassian.jira.issue.fields.screen.FieldScreenSchemeManager.getFieldScreenScheme() is applicable for argument types: (Long) values: [11018]
Stack:
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1525)
groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1511)
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50)
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
script_f7e811b5d28354bcabe175f3e513904a.run(script_f7e811b5d28354bcabe175f3e513904a.groovy:9)
The documentation mentions this method:
FieldScreenScheme | getFieldScreenScheme(Long id) |
I don't understand why this Manager seems to be different from the others (like FieldScreenManager or IssueTypeScreenSchemeManager...).
Could you help me?
Thank you very much!
Olivier
Hey @Olivier Billaud ,
I noticed the error said "no signature of method static..".
You declare and initialise fieldScreenSchemeManager correctly, but then in your next line you try the method with FieldScreenSchemeManager instead of your initialised variable, maybe that's the problem?
Cheers,
Tessa
Oh my gosh, i'm so bad.
Thank you so much Tessa... I'm so tired of myself.
You saved many hours in my day.
See you...
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't worry, we've all been there :)
- Tessa
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.