diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-09-14 14:56:56 -0500 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-09-17 11:35:26 -0500 |
commit | 50a62b479e354efce5d85dd46bc25033cfd066f3 (patch) | |
tree | bd365e9666ab27ce5c975cc2b324ae675639ead3 /app/models | |
parent | ccce7c7955ef193d238cf4aab457403cad4c06b6 (diff) | |
download | gitlab-ce-50a62b479e354efce5d85dd46bc25033cfd066f3.tar.gz |
Filter out archived projects from issue/mr count
Pass the 'non_archived' flag to finder methods
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d68108a8e8e..2134441da86 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1176,13 +1176,13 @@ class User < ActiveRecord::Base def assigned_open_merge_requests_count(force: false) Rails.cache.fetch(['users', id, 'assigned_open_merge_requests_count'], force: force, expires_in: 20.minutes) do - MergeRequestsFinder.new(self, assignee_id: self.id, state: 'opened').execute.count + MergeRequestsFinder.new(self, assignee_id: self.id, state: 'opened', non_archived: true).execute.count end end def assigned_open_issues_count(force: false) Rails.cache.fetch(['users', id, 'assigned_open_issues_count'], force: force, expires_in: 20.minutes) do - IssuesFinder.new(self, assignee_id: self.id, state: 'opened').execute.count + IssuesFinder.new(self, assignee_id: self.id, state: 'opened', non_archived: true).execute.count end end |