From 9fdd0862f74cb4b187fe7fe1422746702a4cb953 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 26 Apr 2014 07:56:00 +0000 Subject: [PATCH] Missing type=array attributes in custom fields API (#16739). git-svn-id: http://svn.redmine.org/redmine/trunk@13109 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/custom_fields/index.api.rsb | 4 ++-- test/integration/api_test/custom_fields_test.rb | 2 ++ 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