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
Tatuya Kamada
gitlab-ce
Commits
bfebf108
Commit
bfebf108
authored
Mar 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reject current_user from close issue emails
parent
4b395045
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
app/services/notification_service.rb
app/services/notification_service.rb
+10
-2
No files found.
app/services/notification_service.rb
View file @
bfebf108
...
...
@@ -21,7 +21,12 @@ class NotificationService
# * project team members with notification level higher then Participating
#
def
close_issue
(
issue
,
current_user
)
[
issue
.
author
,
issue
.
assignee
].
compact
.
uniq
.
each
do
|
recipient
|
recipients
=
[
issue
.
author
,
issue
.
assignee
].
compact
.
uniq
# Dont send email to me when I close an issue
recipients
.
reject!
{
|
u
|
u
==
current_user
}
recipients
.
each
do
|
recipient
|
Notify
.
delay
.
issue_status_changed_email
(
recipient
.
id
,
issue
.
id
,
issue
.
state
,
current_user
.
id
)
end
end
...
...
@@ -32,7 +37,10 @@ class NotificationService
# * issue assignee if his notification level is not Disabled
#
def
reassigned_issue
(
issue
,
current_user
)
recipient_ids
=
[
issue
.
assignee_id
,
issue
.
assignee_id_was
].
keep_if
{
|
id
|
id
&&
id
!=
current_user
.
id
}
recipient_ids
=
[
issue
.
assignee_id
,
issue
.
assignee_id_was
].
compact
.
uniq
# Reject me from recipients if I reassign an issue
recipient_ids
.
reject!
{
|
id
|
id
==
current_user
.
id
}
recipient_ids
.
each
do
|
recipient_id
|
Notify
.
delay
.
reassigned_issue_email
(
recipient_id
,
issue
.
id
,
issue
.
assignee_id_was
)
...
...
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