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 outcomes
Oliver Güntherdd973111a0db
diff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rbindex 0f7bcc3b77c..7d9d29ad388 100644--- a/config/initializers/feature_decisions.rb+++ b/config/initializers/feature_decisions.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+# --copyright# OpenProject is an open source project management software.# Copyright (C) the OpenProject GmbHdiff --git a/modules/meeting/app/models/meeting_agenda_item.rb b/modules/meeting/app/models/meeting_agenda_item.rbindex 73ce6c4e4c4..ee20e556b18 100644--- a/modules/meeting/app/models/meeting_agenda_item.rb+++ b/modules/meeting/app/models/meeting_agenda_item.rb@@ -43,6 +43,8 @@ class MeetingAgendaItem < ApplicationRecordbelongs_to :author, class_name: "User", optional: falsebelongs_to :presenter, class_name: "User", optional: true+ has_many :outcomes, class_name: "MeetingOutcome", dependent: :destroy+acts_as_list scope: :meeting_sectiondefault_scope { order(:position) }diff --git a/modules/meeting/app/models/meeting_outcome.rb b/modules/meeting/app/models/meeting_outcome.rbnew file mode 100644index 00000000000..05119640237--- /dev/null+++ b/modules/meeting/app/models/meeting_outcome.rb@@ -0,0 +1,43 @@+# 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 MeetingOutcome < ApplicationRecord+ belongs_to :meeting_agenda_item+ belongs_to :work_package++ enum kind: {+ information: 0,+ decision: 1,+ work_package: 2+ }.freeze, suffix: true, default: "information"++ validates_presence_of :meeting_agenda_item+ validates_presence_of :notes, if: -> { information_kind? }+ validates_presence_of :work_package, if: -> { work_package_kind? }+enddiff --git a/modules/meeting/db/migrate/20250211185841_create_meeting_outcomes.rb b/modules/meeting/db/migrate/20250211185841_create_meeting_outcomes.rbnew file mode 100644index 00000000000..dd15f1a97ac--- /dev/null+++ b/modules/meeting/db/migrate/20250211185841_create_meeting_outcomes.rb@@ -0,0 +1,43 @@+# 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 CreateMeetingOutcomes < ActiveRecord::Migration[7.1]+ def change+ create_table :meeting_outcomes do |t|+ t.text :notes+ t.belongs_to :meeting_agenda_item, foreign_key: true+ t.belongs_to :work_package, foreign_key: true+ t.integer :kind, default: 0, null: false++ t.timestamps+ end+ end+end