I am currently testing an upgrade from Jira 5.2.7 to Jira 6.2.2
In the jira 5.2.7 we have several scripted fields that ready the Jira Users Account Properties meta-data and displays it in a Scripted Field on a issue.
For Example - in the user account - Jira User. Defined property (Manager - John Doe)
Here is the currently working Jira 5.2.7 scripted field -
import com.atlassian.crowd.embedded.api.User;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.user.UserPropertyManager;
UserPropertyManager userPropertyManager = ComponentAccessor.getUserPropertyManager();
String propKey = "public Manager";
String propValue = null;
User u = getCustomFieldValue('Customer')
if (u) {
propValue = userPropertyManager.getPropertySet(u)?.getString('jira.meta.'+propKey);
}
return propValue;
Now, when I upgraded Jira to 6.2.2, this field no longer works and returns an error -
javax.script.ScriptException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'ahughes(ahughes)' with class 'com.atlassian.jira.user.DelegatingApplicationUser' to class 'com.atlassian.crowd.embedded.api.User' A stacktrace has been logged.
Did Jira 6.2.2 change the Crowd API statement? Is there a 6.2.2 version that would work?
Thanks in advance,
Andre