Get SelectCFType field value.

Kateryna July 3, 2013

I have custom field, type - SelectCFType. How can I get the selected option value?

3 answers

1 accepted

0 votes
Answer accepted
Onkar Ahire
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 Leaders.
July 3, 2013

CustomField customField = customFieldManager.getCustomFieldObject("customfield_10000");

Object customFieldValue = issue.getCustomFieldValue(customField);

I think this code will help you to get customfield.

Regards

Onkar Ahire

Onkar Ahire
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 Leaders.
July 3, 2013

Ok,

Try

issue.getCustomFieldValue(customfield);

Kateryna July 3, 2013

Thank you, it works! =)

0 votes
Onkar Ahire
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 Leaders.
July 3, 2013

Hi Ekateryna,

Click configure >> Edit Option for custom field>> add new custom field

Regards

Onkar Ahire

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2013

Where are you trying to "get" it?

REST, plugin, javascript, something else?

Kateryna July 3, 2013

Sorry, in my plugin.

CustomField customField = CustomFieldManager.getCustomFieldObject(urlfield);

This field have type SelectCFType. I want get selected option value.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 3, 2013

Onkar has just updated the answer with what I was about to say!

Suggest an answer

Log in or Sign up to answer