Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6b92236e
Commit
6b92236e
authored
Mar 23, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't include system notes in issue/MR comment count.
parent
bc4e2518
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
7 deletions
+11
-7
CHANGELOG
CHANGELOG
+1
-0
app/models/note.rb
app/models/note.rb
+1
-0
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+1
-1
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+3
-2
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+3
-2
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+1
-1
lib/gitlab/project_search_results.rb
lib/gitlab/project_search_results.rb
+1
-1
No files found.
CHANGELOG
View file @
6b92236e
...
...
@@ -27,6 +27,7 @@ v 7.10.0 (unreleased)
- Restrict permissions on backup files
- Improve oauth accounts UI in profile page
- Add ability to unlink connected accounts
- Don't include system notes in issue/MR comment count.
v 7.9.0
- Add HipChat integration documentation (Stan Hu)
...
...
app/models/note.rb
View file @
6b92236e
...
...
@@ -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
)
}
...
...
app/views/projects/commits/_commit.html.haml
View file @
6b92236e
...
...
@@ -13,7 +13,7 @@
-
note_count
=
@note_counts
.
fetch
(
commit
.
id
,
0
)
-
else
-
notes
=
project
.
notes
.
for_commit_id
(
commit
.
id
)
-
note_count
=
notes
.
count
-
note_count
=
notes
.
user
.
count
-
if
note_count
>
0
%span
.light
...
...
app/views/projects/issues/_issue.html.haml
View file @
6b92236e
...
...
@@ -10,11 +10,12 @@
-
if
issue
.
closed?
%span
CLOSED
-
if
issue
.
notes
.
any?
-
note_count
=
issue
.
notes
.
user
.
count
-
if
note_count
>
0
%span
%i
.fa.fa-comments
=
issue
.
notes
.
count
=
note_
count
.issue-info
=
link_to
"#
#{
issue
.
iid
}
"
,
issue_path
(
issue
),
class:
"light"
...
...
app/views/projects/merge_requests/_merge_request.html.haml
View file @
6b92236e
...
...
@@ -16,11 +16,12 @@
%span
.label-branch
<
%i
.fa.fa-code-fork
%span
=
merge_request
.
target_branch
-
if
merge_request
.
notes
.
any?
-
note_count
=
merge_request
.
mr_and_commit_notes
.
user
.
count
-
if
note_count
>
0
&
nbsp
;
%span
%i
.fa.fa-comments
=
merge_request
.
mr_and_commit_notes
.
count
=
note_
count
.merge-request-info
=
link_to
"#
#{
merge_request
.
iid
}
"
,
merge_request_path
(
merge_request
),
class:
"light"
-
if
merge_request
.
assignee
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
6b92236e
...
...
@@ -40,7 +40,7 @@
=
link_to
merge_request_path
(
@merge_request
)
do
%i
.fa.fa-comments
Discussion
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
count
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
user
.
count
%li
.commits-tab
{
data:
{
action:
'commits'
}}
=
link_to
merge_request_path
(
@merge_request
),
title:
'Commits'
do
%i
.fa.fa-history
...
...
lib/gitlab/project_search_results.rb
View file @
6b92236e
...
...
@@ -67,7 +67,7 @@ module Gitlab
end
def
notes
Note
.
where
(
project_id:
limit_project_ids
).
search
(
query
).
order
(
'updated_at DESC'
)
Note
.
where
(
project_id:
limit_project_ids
).
user
.
search
(
query
).
order
(
'updated_at DESC'
)
end
def
limit_project_ids
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment