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
1208c6ca
Commit
1208c6ca
authored
Jul 03, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notification for reopened issue.
parent
8d106bed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
app/services/issues/reopen_service.rb
app/services/issues/reopen_service.rb
+1
-0
app/services/notification_service.rb
app/services/notification_service.rb
+14
-0
No files found.
app/services/issues/reopen_service.rb
View file @
1208c6ca
...
@@ -4,6 +4,7 @@ module Issues
...
@@ -4,6 +4,7 @@ module Issues
if
issue
.
reopen
if
issue
.
reopen
event_service
.
reopen_issue
(
issue
,
current_user
)
event_service
.
reopen_issue
(
issue
,
current_user
)
create_note
(
issue
)
create_note
(
issue
)
notification_service
.
reopen_issue
(
issue
,
current_user
)
execute_hooks
(
issue
,
'reopen'
)
execute_hooks
(
issue
,
'reopen'
)
end
end
...
...
app/services/notification_service.rb
View file @
1208c6ca
...
@@ -80,6 +80,10 @@ class NotificationService
...
@@ -80,6 +80,10 @@ class NotificationService
close_resource_email
(
merge_request
,
merge_request
.
target_project
,
current_user
,
'closed_merge_request_email'
)
close_resource_email
(
merge_request
,
merge_request
.
target_project
,
current_user
,
'closed_merge_request_email'
)
end
end
def
reopen_issue
(
issue
,
current_user
)
reopen_resource_email
(
issue
,
issue
.
project
,
current_user
,
'issue_status_changed_email'
,
'reopened'
)
end
# When we merge a merge request we should send next emails:
# When we merge a merge request we should send next emails:
#
#
# * merge_request author if their notification level is not Disabled
# * merge_request author if their notification level is not Disabled
...
@@ -319,6 +323,16 @@ class NotificationService
...
@@ -319,6 +323,16 @@ class NotificationService
end
end
end
end
def
reopen_resource_email
(
target
,
project
,
current_user
,
method
,
status
)
recipients
=
reject_muted_users
([
target
.
author
,
target
.
assignee
],
project
)
recipients
=
recipients
.
concat
(
project_watchers
(
project
)).
uniq
recipients
.
delete
(
current_user
)
recipients
.
each
do
|
recipient
|
mailer
.
send
(
method
,
recipient
.
id
,
target
.
id
,
status
,
current_user
.
id
)
end
end
def
mailer
def
mailer
Notify
.
delay
Notify
.
delay
end
end
...
...
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