I have created a "Send Custom Email " Listener and as part of am trying to share the groups selected in a multigroup picker field
The code i am trying to insert is as follows
<%
for(com.atlassian.crowd.embedded.impl.ImmutableGroup cgroup : (List<com.atlassian.crowd.embedded.impl.ImmutableGroup>)issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom Field 1"))){
out << com.atlassian.jira.component.ComponentAccessor.getUserManager().getGroup(cgroup.getName())
}
%>
However the email I receive is not printing the group name but instead get the below text
com.atlassian.crowd.embedded.impl.ImmutableGroup@62053f61
Can someone please guide me on How i could retreive the group names from the field correctly