diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-14 09:06:15 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-14 09:06:15 +0000 |
commit | 2fa7d2ddf6a7004f89616e43b8279229af831e25 (patch) | |
tree | 91b35d62663f12d68f36a3a12c9891150a9ff251 /app | |
parent | d9251dac4c8f9e27f1e2db4b537d47d7d5a9e5be (diff) | |
download | gitlab-ce-2fa7d2ddf6a7004f89616e43b8279229af831e25.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 5966db21813..948cadc34e5 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -66,6 +66,8 @@ class Issue < ApplicationRecord scope :public_only, -> { where(confidential: false) } scope :confidential_only, -> { where(confidential: true) } + scope :counts_by_state, -> { reorder(nil).group(:state).count } + after_commit :expire_etag_cache after_save :ensure_metrics, unless: :imported? |