diff options
author | Wei-Meng Lee <wlee@gitlab.com> | 2019-02-15 20:56:13 +0300 |
---|---|---|
committer | Wei-Meng Lee <wlee@gitlab.com> | 2019-05-31 15:49:27 +0300 |
commit | 1a402d888c05196212d1ba671368837e85246c9c (patch) | |
tree | fa4c4da1cc8eaf9268421448f7dd62a8b17ffffa /app/mailers/emails/issues.rb | |
parent | 6d73ce696c02bc949b9e3e71b8c14554e43ab340 (diff) |
Send notifications to group-specific email address
- Select notification email by walking up group/subgroup path
- Add settings UI to set group email notification address
- Add tests
Diffstat (limited to 'app/mailers/emails/issues.rb')
-rw-r--r-- | app/mailers/emails/issues.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb index 2b046d17122..f3a3203f7ad 100644 --- a/app/mailers/emails/issues.rb +++ b/app/mailers/emails/issues.rb @@ -83,7 +83,7 @@ module Emails @project = Project.find(project_id) @results = results - mail(to: @user.notification_email, subject: subject('Imported issues')) do |format| + mail(to: recipient(@user.id, @project.group), subject: subject('Imported issues')) do |format| format.html { render layout: 'mailer' } format.text { render layout: 'mailer' } end @@ -103,7 +103,7 @@ module Emails def issue_thread_options(sender_id, recipient_id, reason) { from: sender(sender_id), - to: recipient(recipient_id), + to: recipient(recipient_id, @project.group), subject: subject("#{@issue.title} (##{@issue.iid})"), 'X-GitLab-NotificationReason' => reason } |