Feature #31910

Add additional mail headers for issue tracker

Added by Kit Grose about 1 month ago. Updated 6 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Email notifications
Target version:4.1.0
Resolution:Fixed

Description

As-is, Redmine already sends mail headers for Project, Issue ID, Issue Author and Issue Assignee (plus Host and Site). I'd like additional headers for tracker and priority (e.g. X-Redmine-Tracker and X-Redmine-Priority), such that I can set up rules in my mail client to treat Support or Defect tickets differently to features or other trackers, and similarly to treat Urgent or Immediate issues differently to lower-priority tasks.

We have service level agreements in place with some customers that require us to respond to their issues within a specific time, but it's easy to lose these tickets in the noise of other activity in the system.

For the time being I've been simply looking for the name of the tracker in the subject line but that's prone to false-positives, e.g. if the word "Support" exists elsewhere in the issue's own subject line.

31910.patch Magnifier (1.5 KB) Go MAEDA, 2019-09-02 15:18


Related issues

Related to Redmine - Patch #2746: Send out issue priority in the email notification header New 2009-02-13

Associated revisions

Revision 18459
Added by Go MAEDA 6 days ago

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

Patch by Go MAEDA.

History

#1 Updated by Go MAEDA about 1 month ago

  • Related to Patch #2746: Send out issue priority in the email notification header added

#2 Updated by Go MAEDA about 1 month ago

The following change adds "X-Issue-Tracker" header field to notification emails.

diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index e13abacbd..ecfdee2a6 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -71,6 +71,7 @@ class Mailer < ActionMailer::Base
   def issue_add(user, issue)
     redmine_headers 'Project' => issue.project.identifier,
                     'Issue-Id' => issue.id,
+                    'Issue-Tracker' => issue.tracker.name,
                     'Issue-Author' => issue.author.login
     redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
     message_id issue
@@ -102,6 +103,7 @@ class Mailer < ActionMailer::Base
     issue = journal.journalized
     redmine_headers 'Project' => issue.project.identifier,
                     'Issue-Id' => issue.id,
+                    'Issue-Tracker' => issue.tracker.name,
                     'Issue-Author' => issue.author.login
     redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
     message_id journal

#3 Updated by Go MAEDA 16 days ago

  • File 31910.patchMagnifier added
  • Subject changed from Add additional mail headers for issue tracker and priority to Add additional mail headers for issue tracker
  • Target version set to Candidate for next major release

This is a patch to add X-Issue-Tracker field to the email header.

I think we should focus on the field for the issue tracker here because the field for the issue priority is discussed in #2746.

#4 Updated by Go MAEDA 6 days ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from Candidate for next major release to 4.1.0
  • Resolution set to Fixed

Committed the patch. Thank you for suggesting this improvement.

Also available in: Atom PDF