From 14c858a6c336523949a7c9fcb4911075eae1a609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Fri, 20 May 2016 16:21:27 +0200 Subject: [PATCH] Remove required state of description --- .../v3/work_packages/schema/work_package_schema_representer.rb | 3 ++- .../details/inplace_editor/description_editor_spec.rb | 3 ++- .../schema/work_package_schema_representer_spec.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/api/v3/work_packages/schema/work_package_schema_representer.rb b/lib/api/v3/work_packages/schema/work_package_schema_representer.rb index 3a5fce5852..2d0baaa157 100644 --- a/lib/api/v3/work_packages/schema/work_package_schema_representer.rb +++ b/lib/api/v3/work_packages/schema/work_package_schema_representer.rb @@ -120,7 +120,8 @@ module API max_length: 255 schema :description, - type: 'Formattable' + type: 'Formattable', + required: false schema :start_date, type: 'Date', diff --git a/spec/features/work_packages/details/inplace_editor/description_editor_spec.rb b/spec/features/work_packages/details/inplace_editor/description_editor_spec.rb index 083bb1c006..5043226bdc 100644 --- a/spec/features/work_packages/details/inplace_editor/description_editor_spec.rb +++ b/spec/features/work_packages/details/inplace_editor/description_editor_spec.rb @@ -40,7 +40,8 @@ describe 'description inplace editor', js: true, selenium: true do field.expect_state_text 'Click to enter description...' field.activate! - field.expect_save_button(enabled: false) + # An empty description is also allowed + field.expect_save_button(enabled: true) field.set_value 'A new hope ...' field.expect_save_button(enabled: true) field.submit_by_click diff --git a/spec/lib/api/v3/work_packages/schema/work_package_schema_representer_spec.rb b/spec/lib/api/v3/work_packages/schema/work_package_schema_representer_spec.rb index 8d321adb50..7dcc118058 100644 --- a/spec/lib/api/v3/work_packages/schema/work_package_schema_representer_spec.rb +++ b/spec/lib/api/v3/work_packages/schema/work_package_schema_representer_spec.rb @@ -175,7 +175,7 @@ describe ::API::V3::WorkPackages::Schema::WorkPackageSchemaRepresenter do let(:path) { 'description' } let(:type) { 'Formattable' } let(:name) { I18n.t('attributes.description') } - let(:required) { true } + let(:required) { false } let(:writable) { true } end end