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 label for entity

Klaus Zanders74bbc6bf8565
diff --git a/modules/reporting/app/helpers/reporting_helper.rb b/modules/reporting/app/helpers/reporting_helper.rb
index 1743099f123..c102eaba1ab 100644
--- a/modules/reporting/app/helpers/reporting_helper.rb
+++ b/modules/reporting/app/helpers/reporting_helper.rb
@@ -55,11 +55,13 @@ module ReportingHelper
end
name = name.camelcase
- if CostQuery::Filter.const_defined? name
+ if CostQuery::Filter.const_defined?(name)
CostQuery::Filter.const_get(name).label
- elsif
- CostQuery::GroupBy.const_defined? name
+ elsif CostQuery::GroupBy.const_defined?(name)
CostQuery::GroupBy.const_get(name).label
+ elsif field.to_sym.in?(%i[entity entity_id entity_type])
+ # TODO: Temporary override for now
+ TimeEntry.human_attribute_name(:entity)
else
# note that using WorkPackage.human_attribute_name relies on the attribute
# being an work_package attribute or a general attribute for all models which might not