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
[#59998] add feature flag for work package subject configuration
Eric Schubert9227339b6c23
diff --git a/app/helpers/types_helper.rb b/app/helpers/types_helper.rbindex 71f103504d7..2fcb024f700 100644--- a/app/helpers/types_helper.rb+++ b/app/helpers/types_helper.rb@@ -27,8 +27,9 @@#++module ::TypesHelper+ # rubocop:disable Rails/HelperInstanceVariabledef types_tabs- [+ tabs = [{name: "settings",partial: "types/form/settings",@@ -41,12 +42,6 @@ module ::TypesHelperpath: edit_type_tab_path(id: @type.id, tab: :form_configuration),label: "types.edit.form_configuration.tab"},- {- name: "subject_configuration",- path: edit_type_tab_path(id: @type.id, tab: :subject_configuration),- label: "types.edit.subject_configuration.tab",- view_component: WorkPackages::Types::SubjectConfigurationComponent- },{name: "projects",partial: "types/form/projects",@@ -54,8 +49,23 @@ module ::TypesHelperlabel: "types.edit.projects.tab"}]++ if OpenProject::FeatureDecisions.generate_work_package_subjects_active?+ subject_configuration_tab = {+ name: "subject_configuration",+ path: edit_type_tab_path(id: @type.id, tab: :subject_configuration),+ label: "types.edit.subject_configuration.tab",+ view_component: WorkPackages::Types::SubjectConfigurationComponent+ }++ tabs.insert(2, subject_configuration_tab)+ end++ tabsend+ # rubocop:enable Rails/HelperInstanceVariable+def icon_for_type(type)return unless type@@ -101,8 +111,8 @@ module ::TypesHelperreturn nil unless group.group_type == :attributegroup.attributes- .select { |key| inactive.delete(key) }- .map! { |key| attr_form_map(key, available[key]) }+ .select { |key| inactive.delete(key) }+ .map! { |key| attr_form_map(key, available[key]) }enddef query_to_query_props(group)diff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rbindex 1392c5ce04c..5a969cf8e5c 100644--- a/config/initializers/feature_decisions.rb+++ b/config/initializers/feature_decisions.rb@@ -50,6 +50,10 @@ OpenProject::FeatureDecisions.add :generate_pdf_from_work_package,OpenProject::FeatureDecisions.add :recurring_meetings,description: "Differentiate between one-time and recurring meetings."+OpenProject::FeatureDecisions.add :generate_work_package_subjects,+ description: "Allows the configuration for work package types to have " \+ "automatically generated work package subjects."+# TODO: Remove once the feature flag primerized_work_package_activities is removed altogetherOpenProject::FeatureDecisions.define_singleton_method(:primerized_work_package_activities_active?) doRails.env.production? ||