hi guru,
Need help urgently on trying to query a GroupPicker customfield. I wrote the following code in the script console using the scriptrunner groovy script for the query but instead of returning the group_name, it is returning a class like object "com.atlassian.crowd.embedded.impl.ImmutableGroup@c53".
Any ideas what is wrong with my code ? Thanks in advance.
// issue key : "RMD-2"
// group picker customfield : "customfield_10204"
//###########################################
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.security.groups.GroupManager
import com.atlassian.jira.user.ApplicationUser
def issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("RMD-2")
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_10204")
def abc= issue.getCustomFieldValue(customField).toString()
if (abc==null) {return "fish !"} else {return "1. => "+abc + " from => "+customField.toString()}
//
// returns: 1. => [com.atlassian.crowd.embedded.impl.ImmutableGroup@c53] from => amt_to_WIP
//
//###########################################