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

Fix rubocop issue

Dombi Attilab11418623b95
diff --git a/app/models/project/life_cycle.rb b/app/models/project/life_cycle.rb
index 377dbe00e09..d0dbfbd2423 100644
--- a/app/models/project/life_cycle.rb
+++ b/app/models/project/life_cycle.rb
@@ -29,7 +29,7 @@
class Project::LifeCycle < ApplicationRecord
belongs_to :project, optional: false
belongs_to :life_cycle, optional: false
- has_many :work_packages, foreign_key: :project_life_cycle_id, dependent: :nullify
+ has_many :work_packages, inverse_of: :project_life_cycle, dependent: :nullify
validates :type, inclusion: { in: %w[Project::Stage Project::Gate], message: :must_be_a_stage_or_gate }