diff options
author | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-03-24 15:11:35 +0100 |
---|---|---|
committer | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-03-24 15:11:35 +0100 |
commit | 65f5496e0210be96b4803f655d1a4c94ef1e07fe (patch) | |
tree | c38347e40b1982ebbe2599ff40df5cc3dea8cf92 /app/mailers | |
parent | 36ea864504854558c0dd3f626177a638022c312d (diff) | |
download | gitlab-ce-65f5496e0210be96b4803f655d1a4c94ef1e07fe.tar.gz |
Fix the merge notification email not being sent
The 'author_id_of_changes' attribute is not persisted in the database.
As we retrieve the merge request from the DB just before sending the
email, this attribute was always nil.
Also there was no tests for the merge notification code - tests have
been added.
Fix #6605
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index 5e1b8faf13e..a97d55f1b50 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -29,11 +29,11 @@ module Emails subject: subject("#{@merge_request.title} (!#{@merge_request.iid})")) end - def merged_merge_request_email(recipient_id, merge_request_id) + def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) @merge_request = MergeRequest.find(merge_request_id) @project = @merge_request.project @target_url = project_merge_request_url(@project, @merge_request) - mail(from: sender(@merge_request.author_id_of_changes), + mail(from: sender(updated_by_user_id), to: recipient(recipient_id), subject: subject("#{@merge_request.title} (!#{@merge_request.iid})")) end |