Commit 9020cfe7 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix-approval-state-rule-order' into 'master'

Fix sporadic spec failure on return order of approval rules

See merge request gitlab-org/gitlab-ee!9327
parents 2a546343 f32d4009
......@@ -135,7 +135,7 @@ class ApprovalState
def regular_rules
strong_memoize(:regular_rules) do
rule_source = approval_rules_overwritten? ? merge_request : project
rules = rule_source.approval_rules.select(&:regular?)
rules = rule_source.approval_rules.select(&:regular?).sort_by(&:id)
unless project.feature_available?(:multiple_approval_rules)
rules = rules[0, 1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment