https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-02-14T18:22:09ZRedmineRedmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=73282009-02-14T18:22:09ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Why not use the more standard X-Priority header?</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=73322009-02-14T20:39:08ZBrad Beattie
<ul><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>Why not use the more standard X-Priority header?</p>
</blockquote>
<p>Hrm. The header <a href="http://tools.ietf.org/html/rfc4021#section-2.1.54" class="external">Priority</a> has values "normal", "urgent" and "non-urgent". I can't find any RFC that defines the values of "X-Priority", but most examples I see use the values 1 through 5. While this maps up to Redmine's default priority values, other systems might have limited or extended these enumerations (e.g. my company uses "Low, Normal and Emergency". How would these modified values be mapped to X-Priority? 1, 3, 5? It's kinda vague, yeah?</p>
<p>I guess that's why I thought just creating a Redmine-specific priority header would be a better choice. What're your thoughts on this?</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=73332009-02-14T22:46:27ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>An other problem is that a X-Priority of 1 means urgent, whereas Redmine priorities are sorted in opposite order (1 = low).<br />We need to map Redmine priorities (max => 1, min => 5). Just need to retrieve the total numbers of priorities defined in Redmine.<br />So yes, if you have 3 priorities defined in Redmine, they would be mapped to X-Priority 1, 3 and 5.</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=73442009-02-15T11:20:21ZThomas Pihl
<ul></ul><p>Other solution might be an extra field when defining priorities where you can choose x-priority manually for each priority. This might include an option not to send email for some priorities.</p>
<p>/T</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=73462009-02-15T13:33:32ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I'd really prefer not to add an extra field just for this purpose.<br />Is there any problem with the solution I propose?</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=73622009-02-16T03:00:58ZBrad Beattie
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>I'd really prefer not to add an extra field just for this purpose.<br />Is there any problem with the solution I propose?</p>
</blockquote>
<p>Hrm. Yeah. Let's say we have two Redmine instances: one has priorities <em>deferrable</em> and <em>normal</em>, the other has priorities <em>normal</em> and <em>emergency</em>. How would you propose those two instances would be mapped? I don't see a way of automating this to ensure that any set of customized priorities get mapped properly to the X-Priority header. I guess that's why I suggested a Redmine-specific header.</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=652092015-07-31T01:19:27ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/20443">Feature #20443</a>: Add Priority header to Email notifications</i> added</li></ul> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=652112015-07-31T01:22:26ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/19939">Feature #19939</a>: New X-Redmine-Issue-Priority header, and modification of X-Redmine-Issue-Assignee</i> added</li></ul> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=810122017-09-10T11:32:43ZPeter Volkov
<ul></ul><p>Guys what's left to do here? Can we have X-Redmine-Priority field at least and leave a question if we need standard Priority field and mapping for better times?</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=873192018-09-15T08:01:30ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/12864">Feature #12864</a>: If ticket was created with priority High/Urgent, send smtp-email with priority Urgent</i> added</li></ul> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=931322019-08-16T02:30:07ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/31910">Feature #31910</a>: Add additional mail headers for issue tracker</i> added</li></ul> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1024672021-05-16T08:04:49ZGo MAEDA
<ul><li><strong>Assignee</strong> deleted (<del><i>Jean-Philippe Lang</i></del>)</li></ul><p>The following patch adds a standard Priority field defined in <a href="https://datatracker.ietf.org/doc/html/rfc2156" class="external">RFC 2156</a>. The priority values are mapped to one of "normal", "urgent", or "non-urgent".</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index f58a1c88d..33b82a519 100644
</span><span class="gd">--- a/app/models/mailer.rb
</span><span class="gi">+++ b/app/models/mailer.rb
</span><span class="p">@@ -71,6 +71,7 @@</span> class Mailer < ActionMailer::Base
# Builds a mail for notifying user about a new issue
def issue_add(user, issue)
<span class="gi">+ headers['Priority'] = priority_for_header(issue)
</span> redmine_headers 'Project' => issue.project.identifier,
'Issue-Tracker' => issue.tracker.name,
'Issue-Id' => issue.id,
<span class="p">@@ -103,6 +104,7 @@</span> class Mailer < ActionMailer::Base
# Builds a mail for notifying user about an issue update
def issue_edit(user, journal)
issue = journal.journalized
<span class="gi">+ headers['Priority'] = priority_for_header(issue)
</span> redmine_headers 'Project' => issue.project.identifier,
'Issue-Tracker' => issue.tracker.name,
'Issue-Id' => issue.id,
<span class="p">@@ -763,6 +765,17 @@</span> class Mailer < ActionMailer::Base
h.each {|k, v| headers["X-Redmine-#{k}"] = v.to_s}
end
+ def priority_for_header(issue)
<span class="gi">+ position_name = issue.priority.position_name
+ if position_name.start_with?('high')
+ 'urgent'
+ elsif position_name.start_with?('low')
+ 'non-urgent'
+ else
+ 'normal'
+ end
+ end
+
</span> # Singleton class method is public
class << self
def token_for(object, user)
</code></pre> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1024692021-05-16T12:20:02ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/27374">2746.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/27374/2746.patch">2746.patch</a> added</li><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul><p>Added test code to <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Send out issue priority in the email notification header (Closed)" href="https://www.redmine.org/issues/2746#note-12">#2746#note-12</a>.</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1024712021-05-17T01:57:39ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>5.0.0</i></li></ul><p>Setting the target version to 5.0.0.</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1024882021-05-19T06:30:08ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>5.0.0</i> to <i>Candidate for next major release</i></li></ul><p>Go MAEDA wrote:</p>
<blockquote>
<p>The following patch adds a standard Priority field defined in <a href="https://datatracker.ietf.org/doc/html/rfc2156" class="external">RFC 2156</a>. The priority values are mapped to one of "normal", "urgent", or "non-urgent".</p>
</blockquote>
<p>I found that it is not appropriate to use the Priority header to express issue priorities because the header is related to QoS control of mail delivery. <a href="https://datatracker.ietf.org/doc/html/rfc2076#section-3.9" class="external">RFC2076</a> says the header "can influence transmission speed and delivery".</p>
<p>Since issue priority has nothing to do with mail delivery priority, it is wrong to use the Priority header to express issue priority.</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1099142023-05-04T14:21:35ZHolger Just
<ul><li><strong>File</strong> <a href="/attachments/30423">0001-Add-X-Redmine-Issue-Priority-headers-to-issue-notifi.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/30423/0001-Add-X-Redmine-Issue-Priority-headers-to-issue-notifi.patch">0001-Add-X-Redmine-Issue-Priority-headers-to-issue-notifi.patch</a> added</li></ul><p>The discussion git a bit derailed from the original request here.</p>
<p>I think the consent now is to just sent the configured priority name as an additional header. For that, I have attached an updated patch which was extracted from <a href="https://plan.io/redmine-hosting/" class="external">Planio</a>. To resolve this issue, we could just apply this patch which is a nice low-friction addition.</p>
<p>Further trying to map this to the value to the "standard" <code>X-Priority</code> / <code>Priority</code> fields in mails could then be an additional step. However, this is something that some people may not want and it is something which has wildly differing support in the MTAs and MUAs with various headers allowing different values and slightly differing semantics.</p>
<p>From my (limited) research, the most common headers are:</p>
<ul>
<li><code>Priority</code> - Allows the values <code>Non-Urgent</code>, <code>Normal</code>, <code>Urgent</code></li>
<li><code>X-Priority</code> - Allows the numeric values <code>1</code> - <code>5</code> with lower numbers indicating higher priorities. Outlook only emits <code>1</code>, <code>3</code> and <code>5</code> respectively.</li>
<li><code>Importance</code> - This appears to be a "Microsoft standard". It allows the values <code>Low</code>, <code>Normal</code>, <code>High</code></li>
</ul>
<p>Microsoft / Outlook map their internal importance value to all of these header values.</p>
<p>If so desired, we could set one or all of these headers based on the result of <code>IssuePriority#low?</code> or <code>IssuePriority#high?</code>. However, I don't believe this is particularly useful, as it still just reflects the priority of the issue overall, not the priority of the respective notification. As such, I'd rather vote for just adding the name of the priority in the <code>X-Redmine-Issue-Priority</code> header as implemented by the attached patch and not attempt to deduct a mail priority / importance from that.</p>
<p>Related documentation:</p>
<ul>
<li><a class="external" href="https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcmail/2bb19f1b-b35e-4966-b1cb-1afd044e83ab">https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcmail/2bb19f1b-b35e-4966-b1cb-1afd044e83ab</a></li>
<li><a class="external" href="https://stackoverflow.com/a/64922489/421705">https://stackoverflow.com/a/64922489/421705</a></li>
</ul> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1099422023-05-05T09:20:56ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>5.1.0</i></li></ul><p>Setting the target version to 5.1.0.</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1100502023-05-14T14:35:52ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li></ul><p>Committed the patch in <a class="changeset" title="Add X-Redmine-Issue-Priority headers to issue notification mails (#2746). Patch by Holger Just." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/22244">r22244</a>. Thank you for your contribution.</p>
<p>Redmine 5.1.0 will have <code>X-Redmine-Issue-Priority</code> header field that indicates the issue priority.</p> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1112622023-10-29T22:48:23ZMischa The Evil
<ul><li><strong>Start date</strong> deleted (<del><i>2009-02-13</i></del>)</li></ul> Redmine - Feature #2746: Send out issue priority in the email notification headerhttps://www.redmine.org/issues/2746?journal_id=1112762023-10-30T09:42:12ZGo MAEDA
<ul><li><strong>Tracker</strong> changed from <i>Patch</i> to <i>Feature</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul>