]> source.dussan.org Git - redmine.git/commitdiff
Add description field to custom fields API (#37617).
authorGo MAEDA <maeda@farend.jp>
Thu, 1 Sep 2022 05:25:04 +0000 (05:25 +0000)
committerGo MAEDA <maeda@farend.jp>
Thu, 1 Sep 2022 05:25:04 +0000 (05:25 +0000)
Patch by Holger Just and Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@21793 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/custom_fields/index.api.rsb
test/fixtures/custom_fields.yml
test/integration/api_test/custom_fields_test.rb

index 8233ed1403273fc56f9e86ecb980266b50d4209f..9f46f89f2116ade7e2a80c999d45807a0265e80f 100644 (file)
@@ -3,6 +3,7 @@ api.array :custom_fields do
     api.custom_field do
       api.id                field.id
       api.name              field.name
+      api.description       field.description
       api.customized_type   field.class.customized_class.name.underscore if field.class.customized_class
       api.field_format      field.field_format
       api.regexp            field.regexp
index 98dccdfcb6f7398873958bb7f6be609f62b62a8d..0ca34ab9fb8f2aa56de919d1a35cc64dcd63ff3b 100644 (file)
@@ -1,6 +1,7 @@
 --- 
 custom_fields_001: 
   name: Database
+  description: Select one of the databases
   regexp: ""
   is_for_all: true
   is_filter: true
index 4db397b1a195b04b1d88103c694a000577f78346..30a5c6f7a6763b70c73619d704ae67c8a70b125f 100644 (file)
@@ -30,6 +30,7 @@ class Redmine::ApiTest::CustomFieldsTest < Redmine::ApiTest::Base
     assert_select 'custom_fields' do
       assert_select 'custom_field' do
         assert_select 'name', :text => 'Database'
+        assert_select 'description', :text => 'Select one of the databases'
         assert_select 'id', :text => '2'
         assert_select 'customized_type', :text => 'issue'
         assert_select 'possible_values[type=array]' do