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
adapt cost reports date handling - date from database
ulfertsc8c725437fa0
diff --git a/modules/reporting/app/models/cost_query/result.rb b/modules/reporting/app/models/cost_query/result.rbindex 8690ae253e2..1f0a309aa6e 100644--- a/modules/reporting/app/models/cost_query/result.rb+++ b/modules/reporting/app/models/cost_query/result.rb@@ -56,7 +56,7 @@ class CostQuery::Result < Report::Resultdef start_timestampreturn nil if self["start_time"].blank? || self["time_zone"].blank? || self["spent_on"].blank?- timestamp(Date.parse(self["spent_on"]), self["start_time"], self["time_zone"])+ timestamp(self["spent_on"], self["start_time"], self["time_zone"])enddef end_timestampdiff --git a/modules/reporting/lib/open_project/reporting/cost_entry_xls_table.rb b/modules/reporting/lib/open_project/reporting/cost_entry_xls_table.rbindex 4606b113ed4..52f3e06cb0e 100644--- a/modules/reporting/lib/open_project/reporting/cost_entry_xls_table.rb+++ b/modules/reporting/lib/open_project/reporting/cost_entry_xls_table.rb@@ -73,7 +73,7 @@ class OpenProject::Reporting::CostEntryXlsTable < OpenProject::XlsExport::XlsVieenddef cost_main_columns(result)- main_cols = [show_field(:spent_on, result.fields[:spent_on.to_s])]+ main_cols = [show_field(:spent_on, result.fields["spent_on"])]main_cols.concat cost_main_times_columns(result) if with_times_column?main_colsend@@ -133,7 +133,7 @@ class OpenProject::Reporting::CostEntryXlsTable < OpenProject::XlsExport::XlsViequery.each_direct_result.map(&:itself)- .group_by { |r| DateTime.parse(r.fields["spent_on"]) }+ .group_by { |r| r.fields["spent_on"] }.sort.flat_map { |_, date_results| date_results.sort_by { |r| r.fields["id"] } }enddiff --git a/modules/xls_export/lib/open_project/xls_export/xls_views.rb b/modules/xls_export/lib/open_project/xls_export/xls_views.rbindex 859039037cb..d3b038de2a2 100644--- a/modules/xls_export/lib/open_project/xls_export/xls_views.rb+++ b/modules/xls_export/lib/open_project/xls_export/xls_views.rb@@ -11,7 +11,7 @@ class OpenProject::XlsExport::XlsViewsdef field_representation_map(key, value)case key.to_symwhen :units then value.to_i- when :spent_on then value+ when :spent_on then value.iso8601when :activity_id then mapped value, Enumeration, I18n.t("placeholders.default")when :project_id then project_representation(value)when :user_id, :assigned_to_id then user_representation(value)