diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-24 00:10:25 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-24 00:10:25 +0000 |
commit | 2bb4ea854228c3c9660d5cb55f59e2cafd1f33ec (patch) | |
tree | fcfa3e96f7ecd7a3c229db5b31fb8b8b102c8581 /app/models | |
parent | 2cd6cc7feda8dcb914093e57f331fc15d18a6602 (diff) | |
parent | 6b92236eeb74fa9854165c498a80f52e25e60e18 (diff) | |
download | gitlab-ce-2bb4ea854228c3c9660d5cb55f59e2cafd1f33ec.tar.gz |
Merge branch 'notes-count-without-system' into 'master'
Don't include system notes in issue/MR comment count.
Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2163.
See merge request !430
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/note.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 27b583a869a..e86160e7cd9 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -48,6 +48,7 @@ class Note < ActiveRecord::Base scope :inline, ->{ where("line_code IS NOT NULL") } scope :not_inline, ->{ where(line_code: [nil, '']) } scope :system, ->{ where(system: true) } + scope :user, ->{ where(system: false) } scope :common, ->{ where(noteable_type: ["", nil]) } scope :fresh, ->{ order(created_at: :asc, id: :asc) } scope :inc_author_project, ->{ includes(:project, :author) } |