mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: correctly implements average for reports (#13447)
- Also now marks time_to_first_response as an averaged chart - Averaged charts will now be marked as such in the UI
This commit is contained in:
@@ -11,6 +11,7 @@ module Reports::TimeToFirstResponse
|
||||
report.icon = 'reply'
|
||||
report.higher_is_better = false
|
||||
report.data = []
|
||||
report.average = true
|
||||
|
||||
Topic.time_to_first_response_per_day(report.start_date, report.end_date, category_id: category_id, include_subcategories: include_subcategories).each do |r|
|
||||
report.data << { x: r['date'], y: r['hours'].to_f.round(2) }
|
||||
|
||||
Reference in New Issue
Block a user