Commit 55d0df7a authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix issue due notification emails threading

It should not be a start to a new thread but rather
a reply to an existing thread
parent b3412033
......@@ -11,7 +11,7 @@ module Emails
def issue_due_email(recipient_id, issue_id, reason = nil)
setup_issue_mail(issue_id, recipient_id)
mail_new_thread(@issue, issue_thread_options(@issue.author_id, recipient_id, reason))
mail_answer_thread(@issue, issue_thread_options(@issue.author_id, recipient_id, reason))
end
def new_mention_in_issue_email(recipient_id, issue_id, updated_by_user_id, reason = nil)
......
---
title: Fix issue due notification emails not being threaded correctly
merge_request: 32325
author:
type: fixed
......@@ -187,6 +187,22 @@ describe Notify do
end
end
describe 'that are due soon' do
subject { described_class.issue_due_email(recipient.id, issue.id) }
before do
issue.update(due_date: Date.tomorrow)
end
it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do
let(:model) { issue }
end
it_behaves_like 'it should show Gmail Actions View Issue link'
it_behaves_like 'an unsubscribeable thread'
it_behaves_like 'appearance header and footer enabled'
it_behaves_like 'appearance header and footer not enabled'
end
describe 'status changed' do
let(:status) { 'closed' }
subject { described_class.issue_status_changed_email(recipient.id, issue.id, status, current_user.id) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment