mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 21:44:39 +08:00
FIX: Bug with admin trust level growth report (#19050)
When this report in the admin dashboard has lots of data ( > 75 days of activity), the dates were ordered incorrectly. This is apparently expected behaviour; when using GROUP BY without specifying the ordering, PG decides to order, and it so happens that it works under some conditions but not others. Explicit ordering fixes the problem. However, because this works in some conditions but not others, we can't really add a useful test.
This commit is contained in:
@ -39,6 +39,7 @@ module Reports::TrustLevelGrowth
|
||||
OR action = #{UserHistory.actions[:auto_trust_level_change]}
|
||||
)
|
||||
GROUP BY date(created_at)
|
||||
ORDER BY date(created_at)
|
||||
SQL
|
||||
|
||||
data = Hash[ filters.collect { |x| [x, []] } ]
|
||||
|
Reference in New Issue
Block a user