Hi ,
The following script works fine in Jira 7.
final def authCtxInternal = com.atlassian.jira.component.ComponentAccessor.getJiraAuthenticationContext()
def logIn = { com.atlassian.jira.user.ApplicationUser u ->
try {
//Jira 7
authCtxInternal.setLoggedInUser(u)
} catch (Exception ignore) {
// Jira 6
//noinspection GroovyAssignabilityCheck
authCtxInternal.setLoggedInUser(u.getDirectoryUser())
}
}
But in Jira 6 its throwing error:
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: CreateIssue$__clinit__closure1_closure5.call() is applicable for argument types: (com.atlassian.jira.crowd.embedded.ofbiz.OfBizUser) values: [a-4951:3] Possible solutions: any(), any(), doCall(com.atlassian.jira.user.ApplicationUser), each(groovy.lang.Closure), any(groovy.lang.Closure), each(groovy.lang.Closure)
I tried to use the code in Catch part in try for jira 6 but no luck.
Can anybody help me with this.
Thanks
Shilpa