OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
remove duration from form configuration
ulfertsf6ff373947bd
diff --git a/app/models/type/attributes.rb b/app/models/type/attributes.rbindex 6156efb9707..4387cd7175a 100644--- a/app/models/type/attributes.rb+++ b/app/models/type/attributes.rb@@ -32,13 +32,15 @@ module Type::AttributesEXCLUDED = %w[_type_dependenciesattribute_groups- links parent_id+ links+ parent_idparentdescriptionschedule_manuallyderived_start_datederived_due_date- derived_estimated_time].freeze+ derived_estimated_time+ duration].freezeincluded do# Allow plugins to define constraintsdiff --git a/lib/api/v3/work_packages/schema/work_package_schema_representer.rb b/lib/api/v3/work_packages/schema/work_package_schema_representer.rbindex ff36ecf4216..a7994a6077d 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@@ -123,12 +123,6 @@ module APIwritable: false,show_if: ->(*) { !represented.milestone? && OpenProject::FeatureDecisions.work_packages_duration_field_active? }- # TODO: Remove this, once the duration feature is complete- # This enables hiding the duration field on the form_configuration- ::Type.add_constraint :duration, ->(*) {- OpenProject::FeatureDecisions.work_packages_duration_field_active?- }-schema :schedule_manually,type: 'Boolean',required: false,diff --git a/spec/models/type_spec.rb b/spec/models/type_spec.rbindex 45fb9fca9da..25957d87724 100644--- a/spec/models/type_spec.rb+++ b/spec/models/type_spec.rb@@ -119,8 +119,8 @@ describe ::Type, type: :model do.and_return(true)end- it 'returns the duration field' do- expect(subject).to have_key("duration")+ it 'does not return the duration field' do+ expect(subject).not_to have_key("duration")endcontext 'when the feature flag is off' do