Removed hardcoded format in API response.
git-svn-id: http://svn.redmine.org/redmine/trunk@12403 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ebb8e86122
commit
a59dc1658b
|
@ -15,11 +15,12 @@ api.array :custom_fields do
|
||||||
api.default_value field.default_value
|
api.default_value field.default_value
|
||||||
api.visible field.visible?
|
api.visible field.visible?
|
||||||
|
|
||||||
if field.field_format == 'list'
|
values = field.possible_values_options
|
||||||
|
if values.present?
|
||||||
api.array :possible_values do
|
api.array :possible_values do
|
||||||
field.possible_values.each do |v|
|
values.each do |label, value|
|
||||||
api.possible_value do
|
api.possible_value do
|
||||||
api.value v
|
api.value value || label
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue