Commit 529bf9aa authored by Sean McGivern's avatar Sean McGivern

Merge branch 'group-count-comment' into 'master'

Added clarification comment to the count_key

Closes #34126

See merge request gitlab-org/gitlab!19817
parents bec1492c 57ef0dcb
...@@ -385,6 +385,9 @@ class IssuableFinder ...@@ -385,6 +385,9 @@ class IssuableFinder
end end
def count_key(value) def count_key(value)
# value may be an array if the finder used in `count_by_state` added an
# additional `group by`. Anyway we are sure that state will be always the
# last item because it's added as the last one to the query.
value = Array(value).last value = Array(value).last
klass.available_states.key(value) klass.available_states.key(value)
end end
......
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