Working with a Group Picker (multiple groups), how do I get the group name?

I've tried using Calulated Text and just get the value of this Group Field. However, what I'm getting is not the Group Field displayed value but the following :


I also tried copying it over to a Text Field but got the following


Is there a way to get the group name and be able to use substring function on it? For usernames, I use displayName and get the Full Name of the user.

It's definitely different for groups as using the same does not yield the desired result.

1 answer

1 accepted

You can use the getName() method on the field value:


It did not work. :(

I tried it on both the Group Field and the Text Field it was copied to.

It can only work on the Group field (customfield_12345 in my example). What kind of field is your group field exactly?

If it's a multi-valued field, you can probably use (untested):

if (issue.get("customfield_12345")==null || issue.get("customfield_12345").size() == 0)
   return null;
return issue.get("customfield_12345").iterator().next().getName()

If it doesn't work, look at atlassian-jira.log for syntax errors.

Alright! Thank you so much for the help David! Really appreciate it. :)

I'm trying this now but it's not giving me the EquivalentID

if (issue.get("customfield_12345")==null || issue.get("customfield_12345").size() == 0)
return null;
if "ABCDEF".equals(issue.get("customfield_12345").iterator().next().getName().substring(7,13))
return EquivalentID;
return Unavailable;

IT WORKS!!! Thank you! Is there a reference that I could look into in order to improve the knowledge you are imparting me? I'm not really a Jave Programmer. I've experience on the very old AS400 / RPG Language.

Unfortunately, this requires some knowledge of the internal data model of JIRA, which comes from accessing the JIRA source code which you get with any commercial license.

Figured it out. I just need to add "" to the strings. :)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,739 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot