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

Allow entites from Cost- and TimeEntry

Klaus Zanders649b1b99e2c9
diff --git a/modules/reporting/app/helpers/reporting_helper.rb b/modules/reporting/app/helpers/reporting_helper.rb
index 2d17107464d..e838a7a762a 100644
--- a/modules/reporting/app/helpers/reporting_helper.rb
+++ b/modules/reporting/app/helpers/reporting_helper.rb
@@ -122,7 +122,8 @@ module ReportingHelper
when :work_package_id
link_to_work_package(WorkPackage.find(value.to_i))
when :entity_gid
- entity = GlobalID::Locator.locate(value, only: TimeEntry::ALLOWED_ENTITY_TYPES.map(&:safe_constantize))
+ allowed_types = (TimeEntry::ALLOWED_ENTITY_TYPES | CostEntry::ALLOWED_ENTITY_TYPES).map(&:safe_constantize)
+ entity = GlobalID::Locator.locate(value, only: allowed_types)
if entity.is_a?(::WorkPackage)
link_to_work_package(entity)