Skip to content

Commit

Permalink
Add the gantt module to all newly created projects
Browse files Browse the repository at this point in the history
  • Loading branch information
HDinger authored and oliverguenther committed Feb 1, 2024
1 parent b69679e commit 8cfe39d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/constants/settings/definition.rb
Expand Up @@ -298,7 +298,7 @@ class Definition
allowed: -> { Redmine::I18n.all_languages }
},
default_projects_modules: {
default: %w[calendar board_view work_package_tracking news costs wiki],
default: %w[calendar board_view work_package_tracking gantt news costs wiki],
allowed: -> { OpenProject::AccessControl.available_project_modules.map(&:to_s) }
},
default_projects_public: {
Expand Down
11 changes: 11 additions & 0 deletions db/migrate/20240201115019_add_gantt_module_to_default_modules.rb
@@ -0,0 +1,11 @@
class AddGanttModuleToDefaultModules < ActiveRecord::Migration[7.0]
def up
unless Setting.default_projects_modules.include?('gantt')
Setting.default_projects_modules = Setting.default_projects_modules + ['gantt']
end
end

def down
# Nothing to do
end
end

0 comments on commit 8cfe39d

Please sign in to comment.