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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
ba4f0abf
Commit
ba4f0abf
authored
11 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wall comment does not create an event on dashboard any more
parent
b1bd3f12
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+1
-2
app/observers/activity_observer.rb
app/observers/activity_observer.rb
+6
-3
No files found.
app/helpers/notes_helper.rb
View file @
ba4f0abf
module
NotesHelper
# Helps to distinguish e.g. commit notes in mr notes list
def
note_for_main_target?
(
note
)
note
.
for_wall?
||
(
@target_type
.
camelize
==
note
.
noteable_type
&&
!
note
.
for_diff_line?
)
(
@target_type
.
camelize
==
note
.
noteable_type
&&
!
note
.
for_diff_line?
)
end
def
note_target_fields
...
...
This diff is collapsed.
Click to expand it.
app/observers/activity_observer.rb
View file @
ba4f0abf
...
...
@@ -4,9 +4,12 @@ class ActivityObserver < ActiveRecord::Observer
def
after_create
(
record
)
event_author_id
=
record
.
author_id
# Skip status notes
if
record
.
kind_of?
(
Note
)
&&
record
.
note
.
include?
(
"_Status changed to "
)
return
true
if
record
.
kind_of?
(
Note
)
# Skip system status notes like 'status changed to close'
return
true
if
record
.
note
.
include?
(
"_Status changed to "
)
# Skip wall notes to prevent spaming of dashboard
return
true
if
record
.
noteable_type
.
blank?
end
if
event_author_id
...
...
This diff is collapsed.
Click to expand it.
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