summaryrefslogtreecommitdiffstats
path: root/app/views/custom_fields
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-14 09:00:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-14 09:00:05 +0000
commita59dc1658b1da77b7d2edfdf1052111da2e8148a (patch)
tree5a6e7daf0d48de819d979dc92e501e5ecd3e6ca5 /app/views/custom_fields
parentebb8e8612254b4e5bb4b8121530064cd140a1ece (diff)
downloadredmine-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.rsb7
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