getting the value of a MultiSelectCFType custom field


i use:

$customFieldManager.getCustomFieldObjectByName("Activity Type").getValue($issue)

but the shown value is in brackets: [value] how did i get the value without the brackets ?

Thanks Fredy

1 answer

Hey Fred,

You need to access the option and display the options value.

Hi Bhushan, I'm sure, that you are right, but I don't know how ,-(

haha sorry try this. Havent tested it but should give you an idea.

CustomField field = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Activity Type");
if(field.getCustomFieldType() instanceof MultiSelectCFType){
      Option option = (Option)field.getValue(issue);
      String value = (String)option.getValue();

ok, an in the velocity template :

$customFieldManager.getCustomFieldObjectByName("Activity Type").getValue($issue).getValue()

?? I'll try this as sonn I've time.

Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted Thursday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

175 views 12 3
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