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
Add migration to create backlogs for meetings
Mir Bhatiaa241bf2bcb88
diff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rbindex 427cac19d5d..21856d88df8 100644--- a/config/initializers/feature_decisions.rb+++ b/config/initializers/feature_decisions.rb@@ -67,5 +67,5 @@ OpenProject::FeatureDecisions.add :comments_with_restricted_visibility,OpenProject::FeatureDecisions.add :meeting_backlogs,description: "Enables backlogs for meetings. " \- "Note: Meetings created with this flag off will not be accessible " \- "after activating it."+ "Note: Meetings created with this flag off and recurring " \+ "meetings will not be accessible after activating it."diff --git a/db/migrate/20250416141059_add_backlogs_to_one_time_meetings.rb b/db/migrate/20250416141059_add_backlogs_to_one_time_meetings.rbnew file mode 100644index 00000000000..1dd68c771ad--- /dev/null+++ b/db/migrate/20250416141059_add_backlogs_to_one_time_meetings.rb@@ -0,0 +1,50 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++class AddBacklogsToOneTimeMeetings < ActiveRecord::Migration[8.0]+ def up+ execute <<~SQL.squish+ INSERT INTO meeting_sections (meeting_id, backlog, title, position, created_at, updated_at)+ SELECT m.id, true, '', 0, NOW(), NOW()+ FROM meetings m+ WHERE (+ m.recurring_meeting_id IS NULL+ OR m.template = true+ )+ SQL+ end++ def down+ execute <<~SQL.squish+ DELETE FROM meeting_sections+ WHERE backlog = true+ SQL+ end+end