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
Fix error when generating an invalid GID (#19795)
Klaus Zandersd7a9643db4f2
diff --git a/modules/reporting/app/helpers/reporting_helper.rb b/modules/reporting/app/helpers/reporting_helper.rbindex d2a74231bed..181583151df 100644--- a/modules/reporting/app/helpers/reporting_helper.rb+++ b/modules/reporting/app/helpers/reporting_helper.rb@@ -98,8 +98,7 @@ module ReportingHelperendend- # rubocop:disable Metrics/AbcSize- def field_representation_map(key, value)+ def field_representation_map(key, value) # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexityreturn I18n.t(:"placeholders.default") if value.blank?case key.to_sym@@ -123,7 +122,11 @@ module ReportingHelperlink_to_work_package(WorkPackage.find(value.to_i))when :entity_gidallowed_types = (TimeEntry::ALLOWED_ENTITY_TYPES | CostEntry::ALLOWED_ENTITY_TYPES).map(&:safe_constantize)- entity = GlobalID::Locator.locate(value, only: allowed_types)+ entity = begin+ GlobalID::Locator.locate(value, only: allowed_types)+ rescue URI::InvalidComponentError+ nil+ endif entity.is_a?(::WorkPackage)link_to_work_package(entity)@@ -154,7 +157,6 @@ module ReportingHelpervalue.to_sendend- # rubocop:enable Metrics/AbcSizedef spent_on_time_representation(start_timestamp, hours)return "" if start_timestamp.nil?