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
Correctly show entity_gid in the table
Klaus Zanderscd6eb7a0fb84
diff --git a/modules/reporting/app/helpers/reporting_helper.rb b/modules/reporting/app/helpers/reporting_helper.rbindex e838a7a762a..d0ce8286e5b 100644--- a/modules/reporting/app/helpers/reporting_helper.rb+++ b/modules/reporting/app/helpers/reporting_helper.rb@@ -192,7 +192,8 @@ module ReportingHelperreturn "" if value.blank?case key.to_sym- when :work_package_id, :entity_id, :tweek, :tmonth, :week then value.to_i+ when :entity_id, :tweek, :tmonth, :week then value.to_i+ when :entity_gid then GlobalID.new(value).model_id.to_iwhen :spent_on then value.to_date.mjdelse strip_tags(field_representation_map(key, value))enddiff --git a/modules/reporting/app/models/cost_query/result.rb b/modules/reporting/app/models/cost_query/result.rbindex 1f0a309aa6e..e039ed8ee70 100644--- a/modules/reporting/app/models/cost_query/result.rb+++ b/modules/reporting/app/models/cost_query/result.rb@@ -68,6 +68,10 @@ class CostQuery::Result < Report::Resultstart + self["units"].to_f.hoursend+ def entity_gid+ "gid://#{GlobalID.app}/#{self['entity_type']}/#{self['entity_id']}"+ end+privatedef timestamp(date, time, time_zone)diff --git a/modules/reporting/lib/widget/table/entry_table.rb b/modules/reporting/lib/widget/table/entry_table.rbindex 57345af3245..10cb1a5033d 100644--- a/modules/reporting/lib/widget/table/entry_table.rb+++ b/modules/reporting/lib/widget/table/entry_table.rb@@ -29,7 +29,7 @@class Widget::Table::EntryTable < Widget::Tableinclude ReportingHelper- FIELDS = %i[user_id activity_id entity_id comments logged_by_id project_id].freeze+ FIELDS = %i[user_id activity_id entity_gid comments logged_by_id project_id].freezedef rendercontent = content_tag :div, class: "generic-table--container -with-footer" do