Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I update the value of a SelectCFType field?

Jeff Thomas September 7, 2011

We have a SelectCFType that I am trying to populate when an issue is created. In previous versions of JIRA, I would use:

typeField.getCustomFieldType().updateValue(typeField, issue, "value");

To update the field and this worked great for our plain text fields and this select drop down box. In 4.4, if I use the same method above, the field does not save the value and the below error is produced in the logs:

2011-09-07 20:25:38,831 http-80-1 WARN UserName 1225x34x1 c0jmsb 146.7.22.237 /secure/CreateIssueDetails.jspa [issue.customfields.impl.SelectCFType] of type class java.lang.String

I have tried passing the option id and a List of the string, but these do not work either and produce the same error as above. How should I be updating the value for this select field?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Jobin Kuruvilla [Adaptavist]
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.
September 7, 2011

It should be an Option object.

Jeff Thomas September 7, 2011

Thank you Jobin! It appears that 4.4 requires that it be an Option object.

MattS
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.
September 7, 2011

Yup, more info at http://confluence.atlassian.com/display/JIRA/Plugin+Developer+Notes+for+JIRA+4.4#PluginDeveloperNotesforJIRA44-Single-andMulti-Sele

TAGS
AUG Leaders

Atlassian Community Events