mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 07:21:12 +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:
parent
c22ba96c92
commit
59968110a3
@ -70,6 +70,7 @@ class Mailer < ActionMailer::Base
|
|||||||
# Builds a mail for notifying user about a new issue
|
# Builds a mail for notifying user about a new issue
|
||||||
def issue_add(user, issue)
|
def issue_add(user, issue)
|
||||||
redmine_headers 'Project' => issue.project.identifier,
|
redmine_headers 'Project' => issue.project.identifier,
|
||||||
|
'Issue-Tracker' => issue.tracker.name,
|
||||||
'Issue-Id' => issue.id,
|
'Issue-Id' => issue.id,
|
||||||
'Issue-Author' => issue.author.login
|
'Issue-Author' => issue.author.login
|
||||||
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
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)
|
def issue_edit(user, journal)
|
||||||
issue = journal.journalized
|
issue = journal.journalized
|
||||||
redmine_headers 'Project' => issue.project.identifier,
|
redmine_headers 'Project' => issue.project.identifier,
|
||||||
|
'Issue-Tracker' => issue.tracker.name,
|
||||||
'Issue-Id' => issue.id,
|
'Issue-Id' => issue.id,
|
||||||
'Issue-Author' => issue.author.login
|
'Issue-Author' => issue.author.login
|
||||||
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
||||||
|
|||||||
@ -208,6 +208,7 @@ class MailerTest < ActiveSupport::TestCase
|
|||||||
assert_equal 'auto-generated', mail.header['Auto-Submitted'].to_s
|
assert_equal 'auto-generated', mail.header['Auto-Submitted'].to_s
|
||||||
# List-Id should not include the display name "Redmine"
|
# List-Id should not include the display name "Redmine"
|
||||||
assert_equal '<redmine.example.net>', mail.header['List-Id'].to_s
|
assert_equal '<redmine.example.net>', mail.header['List-Id'].to_s
|
||||||
|
assert_equal 'Bug', mail.header['X-Redmine-Issue-Tracker'].to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_email_headers_should_include_sender
|
def test_email_headers_should_include_sender
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user