diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-14 09:00:05 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-14 09:00:05 +0000 |
commit | a59dc1658b1da77b7d2edfdf1052111da2e8148a (patch) | |
tree | 5a6e7daf0d48de819d979dc92e501e5ecd3e6ca5 /app/views/custom_fields | |
parent | ebb8e8612254b4e5bb4b8121530064cd140a1ece (diff) | |
download | redmine-a59dc1658b1da77b7d2edfdf1052111da2e8148a.tar.gz redmine-a59dc1658b1da77b7d2edfdf1052111da2e8148a.zip |
Removed hardcoded format in API response.
git-svn-id: http://svn.redmine.org/redmine/trunk@12403 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r-- | app/views/custom_fields/index.api.rsb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/custom_fields/index.api.rsb b/app/views/custom_fields/index.api.rsb index e640f3315..4dbd44c7a 100644 --- a/app/views/custom_fields/index.api.rsb +++ b/app/views/custom_fields/index.api.rsb @@ -15,11 +15,12 @@ api.array :custom_fields do api.default_value field.default_value api.visible field.visible? - if field.field_format == 'list' + values = field.possible_values_options + if values.present? api.array :possible_values do - field.possible_values.each do |v| + values.each do |label, value| api.possible_value do - api.value v + api.value value || label end end end |