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

Correctly mark work_package_id as ignored

Klaus Zandersb3db476d5ea4
diff --git a/modules/costs/app/models/cost_entry.rb b/modules/costs/app/models/cost_entry.rb
index 732f83ebc6d..9e0ee110d65 100644
--- a/modules/costs/app/models/cost_entry.rb
+++ b/modules/costs/app/models/cost_entry.rb
@@ -31,7 +31,7 @@
class CostEntry < ApplicationRecord
ALLOWED_ENTITY_TYPES = %w[WorkPackage].freeze
- self.ignored_columns += %w[work_package_id]
+ self.ignored_columns += [:work_package_id]
belongs_to :project
belongs_to :entity, polymorphic: true
diff --git a/modules/costs/app/models/time_entry.rb b/modules/costs/app/models/time_entry.rb
index d4f5febc8ca..17c9b443125 100644
--- a/modules/costs/app/models/time_entry.rb
+++ b/modules/costs/app/models/time_entry.rb
@@ -31,6 +31,8 @@
class TimeEntry < ApplicationRecord
ALLOWED_ENTITY_TYPES = %w[WorkPackage Meeting].freeze
+ self.ignored_columns += [:work_package_id]
+
# could have used polymorphic association
# project association here allows easy loading of time entries at project level with one database trip
belongs_to :project