I have a custom field which is a radio button, its values are group names (say G-1, G-2). These groups are defined in the server.
Code below omits the imports for bervity
def groupManager = ComponentAccessor.groupManager
def customFieldManager = ComponentAccessor.customFieldManager
def groupNameField = customFieldManager.getCustomFieldObjectByName("zzGroupPicker")
def groupNameSelected = issue.getCustomFieldValue(groupNameField) as List
def gn = groupNameSelected[0].toString()
def group = groupManager.getGroup(gn)
def msgDebug = "gn='" + gn + "', group=" + group
msgDebug
When I run it in ScriptRunner script console, the output is this:
gn='com.atlassian.crowd.embedded.impl.ImmutableGroup@7056c6db', group=null
So how do I get the group name (G-1) instead of what seems to be the object name?
Thanks