I am using ScriptRunner to Fast Track an issue that comes in from Service Desk. FOr the most part, this is working great. However for a small number of users it does not do the fast track and throws this error:
Exception in thread "Thread-3084" groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.atlassian.jira.security.JiraAuthenticationContextImpl#setLoggedInUser. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [interface com.atlassian.crowd.embedded.api.User] [interface com.atlassian.jira.user.ApplicationUser] at groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.java:3202) at groovy.lang.MetaClassImpl.chooseMethodInternal(MetaClassImpl.java:3154) at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:3097) at groovy.lang.MetaClassImpl.getMethodWithCachingInternal(MetaClassImpl.java:1325) at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3323) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:129) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:163) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition.doTransition(FasttrackTransition.groovy:135) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition.this$2$doTransition(FasttrackTransition.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition.this$dist$invoke$1(FasttrackTransition.groovy) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition$1.methodMissing(FasttrackTransition.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:933) at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1256) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1209) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition$1.run(FasttrackTransition.groovy:97) at java.lang.Thread.run(Unknown Source)
Not sure why it is working for some and not others.
Has anyone seen this before?
That is where I am confused by this, the transition this is a post-function for is "Create" and the permissions require that for create a user be member of jira-users... so they would have to be logged in. The Fast Track takes them to another status, Need More Info for which there are no conditions or validators.
From the code it looks like it would fail, so I created a ticket: https://jamieechlin.atlassian.net/browse/GRV-536 If that's not your issue can you find some pattern for the ones that failed...?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It looks like it will fail if the transition is done by anonymous, ie no user is logged in. Seems to be a bug. Does that seem to be the case, if you look at the transition history of the affected records?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.