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

revert changes to cost_query sql

as-op638596ed0385
diff --git a/modules/reporting/app/models/cost_query/sql_statement.rb b/modules/reporting/app/models/cost_query/sql_statement.rb
index d43b2dc2920..d2cf27cb09d 100644
--- a/modules/reporting/app/models/cost_query/sql_statement.rb
+++ b/modules/reporting/app/models/cost_query/sql_statement.rb
@@ -74,8 +74,6 @@ class CostQuery::SqlStatement < Report::SqlStatement
# cost_type_id | -1 | cost_type_id
# type | "TimeEntry" | "CostEntry"
# count | 1 | 1
- # start_time | start_time | nil
- # time_zone | time_zone | nil
#
# Also: This _should_ handle joining activities and cost_types, as the logic differs for time_entries
# and cost_entries.
@@ -104,7 +102,7 @@ class CostQuery::SqlStatement < Report::SqlStatement
#
# @param [CostQuery::SqlStatement] query The statement to adjust
def self.unify_time_entries(query)
- query.select :activity_id, :logged_by_id, :start_time, :time_zone, units: :hours, cost_type_id: -1
+ query.select :activity_id, :logged_by_id, :start_time, cost_type_id: -1
query.select cost_type: quoted_label(:caption_labor)
end
@@ -113,7 +111,7 @@ class CostQuery::SqlStatement < Report::SqlStatement
#
# @param [CostQuery::SqlStatement] query The statement to adjust
def self.unify_cost_entries(query)
- query.select :units, :cost_type_id, :logged_by_id, activity_id: -1, start_time: nil, time_zone: nil
+ query.select :units, :cost_type_id, :logged_by_id, activity_id: -1
query.select cost_type: "cost_types.name"
query.join CostType
end