The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner in Jira > com.atlassian.crowd.embedded.impl.ImmutableGroup@ > How to fix?

kristinb
Contributor
April 14, 2013

Hello good people!

I want to be able to sort bugs in Jira by Groups, depending on reporter. So... I'm trying to automatically set the group by reporter.

In this attempt of mine, I'm getting this problem when the group name is returned; the name of the group isn't displayed but only this here:

com.atlassian.crowd.embedded.impl.ImmutableGroup@9099bd68.

Anyone know how to solve this so that the actual name of the group is displayed?


This is my script:

import com.atlassian.jira.ComponentManager

import com.atlassian.jira.user.util.UserUtil

import com.atlassian.jira.issue.Issue

import com.atlassian.crowd.embedded.api.User

def componentManager = ComponentManager.getInstance()

def userUtil = componentManager.getUserUtil()

GroupList = userUtil.getGroupsForUser("ces");

return GroupList;


1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 14, 2013

userUtil.getGroupsForUser("ces")*.name

Will give you a java.util.List of the group names.

kristinb
Contributor
April 15, 2013

Worked! Thank you Jamie :)

TAGS
AUG Leaders

Atlassian Community Events