diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-18 14:44:17 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-18 14:44:17 +0000 |
commit | de96d418b14aa2f2d58947b8d22d42470cb06028 (patch) | |
tree | b3d11c4dcc4da1be8adff30c3fdbc6979df76c2f | |
parent | 33ce711f9925d82c7b0321fbccd1427560ffb378 (diff) | |
download | redmine-de96d418b14aa2f2d58947b8d22d42470cb06028.tar.gz redmine-de96d418b14aa2f2d58947b8d22d42470cb06028.zip |
Add "editable" attribute in the custom fields API response (#41935).
git-svn-id: https://svn.redmine.org/redmine/trunk@23678 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/custom_fields/index.api.rsb | 1 | ||||
-rw-r--r-- | test/integration/api_test/custom_fields_test.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/views/custom_fields/index.api.rsb b/app/views/custom_fields/index.api.rsb index 9f46f89f2..d4b19d62b 100644 --- a/app/views/custom_fields/index.api.rsb +++ b/app/views/custom_fields/index.api.rsb @@ -15,6 +15,7 @@ api.array :custom_fields do api.multiple field.multiple? api.default_value field.default_value api.visible field.visible? + api.editable field.editable? values = field.possible_values_options if values.present? diff --git a/test/integration/api_test/custom_fields_test.rb b/test/integration/api_test/custom_fields_test.rb index 0df56e59a..4fb06636e 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 end assert_select 'trackers[type=array]' assert_select 'roles[type=array]' + assert_select 'visible', :text => 'true' + assert_select 'editable', :text => 'true' end end end |