From 9fc08851a6b6f6937c294024eafa1d28ed5eda2f Mon Sep 17 00:00:00 2001 From: Eric Schubert Date: Fri, 6 Dec 2024 15:25:12 +0100 Subject: [PATCH] [#59864] remove feature flag - https://community.openproject.org/wp/59864 --- app/helpers/custom_fields_helper.rb | 5 ----- config/initializers/feature_decisions.rb | 3 --- spec/features/custom_fields/hierarchy_custom_field_spec.rb | 3 +-- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 1c9d15ae2087..f9880b5d14e6 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -204,14 +204,9 @@ def format_value(value, custom_field) # Return an array of custom field formats which can be used in select_tag def custom_field_formats_for_select(custom_field) - hierarchy_if_deactivated = lambda do |format| - format.name == "hierarchy" && !OpenProject::FeatureDecisions.custom_field_of_type_hierarchy_active? - end - OpenProject::CustomFieldFormat.all_for_field(custom_field) .sort_by(&:order) .reject { |format| format.label.nil? } - .reject(&hierarchy_if_deactivated) .map do |custom_field_format| [label_for_custom_field_format(custom_field_format.name), custom_field_format.name] end diff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rb index 1af9d4f3b80d..546662ab0263 100644 --- a/config/initializers/feature_decisions.rb +++ b/config/initializers/feature_decisions.rb @@ -47,9 +47,6 @@ description: "Allows to generate a PDF document from a work package description. " \ "See #45896 for details." -OpenProject::FeatureDecisions.add :custom_field_of_type_hierarchy, - description: "Allows the use of the custom field type 'Hierarchy'." - # TODO: Remove once the feature flag primerized_work_package_activities is removed altogether OpenProject::FeatureDecisions.define_singleton_method(:primerized_work_package_activities_active?) do Rails.env.production? || diff --git a/spec/features/custom_fields/hierarchy_custom_field_spec.rb b/spec/features/custom_fields/hierarchy_custom_field_spec.rb index 68542e168e23..37344c95716f 100644 --- a/spec/features/custom_fields/hierarchy_custom_field_spec.rb +++ b/spec/features/custom_fields/hierarchy_custom_field_spec.rb @@ -40,8 +40,7 @@ allow(EnterpriseToken).to receive(:allows_to?).and_return(true) end - it "lets you create, update and delete a custom field of type hierarchy", - with_flag: { custom_field_of_type_hierarchy: true } do + it "lets you create, update and delete a custom field of type hierarchy" do login_as admin # region CustomField creation