diff options
-rw-r--r-- | app/helpers/issuables_helper.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index d81ba2c06eb..0748e748738 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -240,7 +240,10 @@ module IssuablesHelper def issuables_count_for_state(issuable_type, state) finder = public_send("#{issuable_type}_finder") # rubocop:disable GitlabSecurity/PublicSend - finder.count_by_state[state] + + @counts ||= {} + @counts[issuable_type] ||= finder.count_by_state + @counts[issuable_type][state] end def close_issuable_url(issuable) |