Skip to content

Commit

Permalink
fix(APIv2): RHINENG-8784 sort top_failed_rules by severity
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Aug 6, 2024
1 parent 5cbf833 commit a2ef278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/v2/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def top_failed_rules
.group(V2::Rule.arel_table[:ref_id], V2::Rule.arel_table[:severity])
.select(V2::Rule.arel_table[:ref_id], V2::Rule.arel_table[:severity],
V2::RuleResult.arel_table[:result].count.as('count'))
.order(count: :desc).limit(10)
.order(V2::Rule.sorted_severities => :desc, count: :desc).limit(10)
end
# rubocop:enable Metrics/AbcSize
end
Expand Down

0 comments on commit a2ef278

Please sign in to comment.