OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/report/group_by/sql_aggregation.rb

18 lines
395 B

class Report::GroupBy
module SqlAggregation
def responsible_for_sql?
true
end
def compute_result
super.tap { |r| r.important_fields = group_fields }.grouped_by(all_group_fields(false), type, group_fields)
end
def sql_statement
super.tap do |sql|
define_group sql
sql.count unless sql.selects.include? "count"
end
end
end
end