1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00

Add additional mail headers for issue tracker (#31910).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18459 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-09-12 21:52:21 +00:00
parent c22ba96c92
commit 59968110a3
2 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,7 @@ class Mailer < ActionMailer::Base
# Builds a mail for notifying user about a new issue
def issue_add(user, issue)
redmine_headers 'Project' => issue.project.identifier,
'Issue-Tracker' => issue.tracker.name,
'Issue-Id' => issue.id,
'Issue-Author' => issue.author.login
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
@ -101,6 +102,7 @@ class Mailer < ActionMailer::Base
def issue_edit(user, journal)
issue = journal.journalized
redmine_headers 'Project' => issue.project.identifier,
'Issue-Tracker' => issue.tracker.name,
'Issue-Id' => issue.id,
'Issue-Author' => issue.author.login
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to

View File

@ -208,6 +208,7 @@ class MailerTest < ActiveSupport::TestCase
assert_equal 'auto-generated', mail.header['Auto-Submitted'].to_s
# List-Id should not include the display name "Redmine"
assert_equal '<redmine.example.net>', mail.header['List-Id'].to_s
assert_equal 'Bug', mail.header['X-Redmine-Issue-Tracker'].to_s
end
def test_email_headers_should_include_sender