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
Boxiang Sun
gitlab-ce
Commits
ce9686e3
Commit
ce9686e3
authored
Jan 25, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include issue/mr participants in list of recipients for close/reopen emails
parent
a4dad708
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
app/services/notification_service.rb
app/services/notification_service.rb
+16
-2
No files found.
app/services/notification_service.rb
View file @
ce9686e3
...
@@ -331,7 +331,14 @@ class NotificationService
...
@@ -331,7 +331,14 @@ class NotificationService
end
end
def
close_resource_email
(
target
,
project
,
current_user
,
method
)
def
close_resource_email
(
target
,
project
,
current_user
,
method
)
recipients
=
reject_muted_users
([
target
.
author
,
target
.
assignee
],
project
)
participants
=
if
target
.
respond_to?
(
:participants
)
target
.
participants
else
[
target
.
author
,
target
.
assignee
]
end
recipients
=
reject_muted_users
(
participants
,
project
)
recipients
=
reject_mention_users
(
recipients
,
project
)
recipients
=
reject_mention_users
(
recipients
,
project
)
recipients
=
recipients
.
concat
(
project_watchers
(
project
)).
uniq
recipients
=
recipients
.
concat
(
project_watchers
(
project
)).
uniq
recipients
.
delete
(
current_user
)
recipients
.
delete
(
current_user
)
...
@@ -362,7 +369,14 @@ class NotificationService
...
@@ -362,7 +369,14 @@ class NotificationService
end
end
def
reopen_resource_email
(
target
,
project
,
current_user
,
method
,
status
)
def
reopen_resource_email
(
target
,
project
,
current_user
,
method
,
status
)
recipients
=
reject_muted_users
([
target
.
author
,
target
.
assignee
],
project
)
participants
=
if
target
.
respond_to?
(
:participants
)
target
.
participants
else
[
target
.
author
,
target
.
assignee
]
end
recipients
=
reject_muted_users
(
participants
,
project
)
recipients
=
reject_mention_users
(
recipients
,
project
)
recipients
=
reject_mention_users
(
recipients
,
project
)
recipients
=
recipients
.
concat
(
project_watchers
(
project
)).
uniq
recipients
=
recipients
.
concat
(
project_watchers
(
project
)).
uniq
recipients
.
delete
(
current_user
)
recipients
.
delete
(
current_user
)
...
...
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