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 set a select list field to 'None' for an issue programmatically?

Joshua Augustinus January 30, 2013

How do I set a select list field to 'None' for an issue programmatically? I know how to set a value of a select list custom field, but in this case I want to remove any selections so that it becomes the default value of 'None'.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
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.
January 30, 2013

Just set null. None is basically setting empty value.

Joshua Augustinus January 31, 2013

Its not working. My code is like this:

MutableIssue issue = _issueManager.getIssueObject(currentIssue.getId());
	    	CustomField cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName(CUSTOM_FIELD_NAME);
	    	
	    	cf.updateValue(null, issue, null, new DefaultIssueChangeHolder());

An exception is thrown on the last line.

TAGS
AUG Leaders

Atlassian Community Events