Skip to content

Commit

Permalink
Add secondary sort order on count, bug id
Browse files Browse the repository at this point in the history
This ensures a consistent ordering of Rankings, in case the totals are
identical.
  • Loading branch information
dregad committed Sep 8, 2019
1 parent 8dd03b4 commit 26ce0d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GaugeSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function getRatings() {
INNER JOIN {$t_bug_table} b ON sd.bugid = b.id
{$t_where_clause}
GROUP BY sd.bugid
ORDER BY sum(sd.rating) DESC";
ORDER BY sum(sd.rating) DESC, count(sd.rating) DESC, sd.bugid";
$t_result = db_query( $t_query, $t_param );

# Store rankings in an array
Expand Down

0 comments on commit 26ce0d7

Please sign in to comment.