summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/custom_fields/index.api.rsb4
-rw-r--r--test/integration/api_test/custom_fields_test.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/custom_fields/index.api.rsb b/app/views/custom_fields/index.api.rsb
index 902edff16..77c9cf3b3 100644
--- a/app/views/custom_fields/index.api.rsb
+++ b/app/views/custom_fields/index.api.rsb
@@ -27,12 +27,12 @@ api.array :custom_fields do
end
if field.is_a?(IssueCustomField)
- api.trackers do
+ api.array :trackers do
field.trackers.each do |tracker|
api.tracker :id => tracker.id, :name => tracker.name
end
end
- api.roles do
+ api.array :roles do
field.roles.each do |role|
api.role :id => role.id, :name => role.name
end
diff --git a/test/integration/api_test/custom_fields_test.rb b/test/integration/api_test/custom_fields_test.rb
index 3b5bbdd35..4ef6fc707 100644
--- a/test/integration/api_test/custom_fields_test.rb
+++ b/test/integration/api_test/custom_fields_test.rb
@@ -37,6 +37,8 @@ class Redmine::ApiTest::CustomFieldsTest < Redmine::ApiTest::Base
assert_select 'possible_values[type=array]' do
assert_select 'possible_value>value', :text => 'PostgreSQL'
end
+ assert_select 'trackers[type=array]'
+ assert_select 'roles[type=array]'
end
end
end