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
Use escaped formatted value
Oliver Günther4de17dc71d35
diff --git a/modules/reporting/app/helpers/reporting_helper.rb b/modules/reporting/app/helpers/reporting_helper.rbindex 28f717337dd..ac76405a08a 100644--- a/modules/reporting/app/helpers/reporting_helper.rb+++ b/modules/reporting/app/helpers/reporting_helper.rb@@ -121,7 +121,7 @@ module ReportingHelperwhen :version_id then h(Version.find(value.to_i).name)when :singleton_value then ''when :status_id then h(Status.find(value.to_i).name)- when /custom_field\d+/ then custom_value(key, value)+ when /custom_field\d+/ then h(custom_value(key, value))else h(value.to_s)endend@@ -133,7 +133,7 @@ module ReportingHelper# and then properly cast the valueCustomValue.new(custom_field_id: cf_id, value:)- .typed_value+ .formatted_valueenddef field_sort_map(key, value)diff --git a/modules/reporting/spec/helpers/reporting_helper_spec.rb b/modules/reporting/spec/helpers/reporting_helper_spec.rbindex 840a206c588..18eea612dae 100644--- a/modules/reporting/spec/helpers/reporting_helper_spec.rb+++ b/modules/reporting/spec/helpers/reporting_helper_spec.rb@@ -63,7 +63,7 @@ RSpec.describe ReportingHelper doit 'returns the option value' doexpect(field_representation_map("custom_field#{custom_field.id}", 3.0))- .to be 3.0+ .to eq "3.0"endendend