Actions
Defect #15929
closedREST API: Integer custom field validation fails when using non-string values
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
I have an issue custom field "My field" of integer type. This field doesn't have any additional validation rules for length and regexp.
When I try to update it's value for some issue, validation fails with message "My field is not a number".
I tried both variants for custom fields:
{"issue":{"custom_field_values":{"12":15}}} {"issue":{"custom_fields":[{"id":12,"value":15}]}}
Result is the same.
Here is the part of production.log:
Started PUT "/issues/788.json" for 2a00:9700:0:10:1e6f:65ff:fe54:fb4a at Wed Jan 22 16:45:48 +0700 2014 Processing by IssuesController#update as JSON Parameters: {"issue"=>{"custom_field_values"=>{"12"=>15}}, "id"=>"788"} Current user: vitek (id=1) Rendered common/error_messages.api.rsb (0.7ms) Completed 422 Unprocessable Entity in 273.8ms (Views: 1.9ms | ActiveRecord: 24.9ms)
Actions