Skip to content

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

Remove work_packages_duration_field_active feature flag from Settings

Dombi Attila40866dd70005
diff --git a/config/constants/settings/definitions.rb b/config/constants/settings/definitions.rb
index ca4ee22f88c..938f0936216 100644
--- a/config/constants/settings/definitions.rb
+++ b/config/constants/settings/definitions.rb
@@ -986,10 +986,6 @@ Settings::Definition.define do
add :work_package_startdate_is_adddate,
default: false
- add :work_packages_duration_field_active,
- default: Rails.env.development?,
- format: :boolean
-
add :youtube_channel,
default: 'https://www.youtube.com/c/OpenProjectCommunity',
writable: false
diff --git a/db/migrate/20220817154403_remove_work_packages_duration_field_active_setting.rb b/db/migrate/20220817154403_remove_work_packages_duration_field_active_setting.rb
new file mode 100644
index 00000000000..d01138c40c2
--- /dev/null
+++ b/db/migrate/20220817154403_remove_work_packages_duration_field_active_setting.rb
@@ -0,0 +1,5 @@
+class RemoveWorkPackagesDurationFieldActiveSetting < ActiveRecord::Migration[7.0]
+ def change
+ Setting.where(name: 'work_packages_duration_field_active').destroy_all
+ end
+end
diff --git a/lib/open_project/feature_decisions.rb b/lib/open_project/feature_decisions.rb
index d942e3d2798..8342538e533 100644
--- a/lib/open_project/feature_decisions.rb
+++ b/lib/open_project/feature_decisions.rb
@@ -40,8 +40,9 @@ module OpenProject
# Setting.feature_your_module_active || Date.today > release_date
# end
+ # TODO: remove this feature flag
def self.work_packages_duration_field_active?
- Setting.work_packages_duration_field_active
+ true
end
end
end