• Sean McGivern's avatar
    Count all issuable states at once · 8ee07280
    Sean McGivern authored
    Instead of doing n queries for n states, do one query to get all the
    counts grouped by state, and figure out what the count is for each state
    is from that. We can still cache the individual counts (it can't hurt),
    but this will help with initial load.
    Note that the `opened` scope on `Issuable` includes the `opened` and
    `reopened` states, which is why there's a special case.
issuable_finder.rb 8.22 KB