Feature #13111

New setting to include the status changes in issue mail notifications subject

Added by Francewhoa (Francois Carpentier) over 6 years ago. Updated 4 months ago.

Status:ClosedStart date:2008-02-04
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Email notifications
Target version:4.1.0
Resolution:Fixed

Description

Note: I searched but could find how to re-open an issue at #603. So I'm creating this new one.


Ideally, the subject would just contain:

[the project name, the tracker, the issue #], status and the subject of the issue.

No "status". This is useful because it allows email clients to thread all emails relating to a single issue together. "status" is already included in the email notification body so it's a duplicate any way.

Current subject line don't work with clients like Gmail. Reply from Gmail: "A conversation will break off into a new thread if the subject line of the conversation is changed" Source: http://support.google.com/mail/bin/answer.py?hl=en&answer=5900 The subject line change because the "status" change.

I would be happy to contribute testing :) Any volunteer for a patch?

0001-New-setting-to-include-the-status-changes-in-issue-m.patch Magnifier (4.86 KB) Marius BALTEANU, 2019-02-19 23:00

new_setting.png (48.7 KB) Marius BALTEANU, 2019-02-19 23:03

office365.png (154 KB) Marius BALTEANU, 2019-02-19 23:15

gmail.png (158 KB) Marius BALTEANU, 2019-02-19 23:16


Related issues

Related to Redmine - Feature #3660: Configurable subject of notification email for issue_add/... New 2009-07-23
Related to Redmine - Defect #17096: Issue emails cannot be threaded by some mailers due to in... Closed
Related to Redmine - Patch #13658: include "In-Reply-To" field to aid email threading for so... New
Related to Redmine - Patch #31065: Fix tests that has incorrect verification target Closed
Duplicated by Redmine - Feature #13083: Ticket status on email subject Closed
Copied from Redmine - Feature #603: Don't include new status for issues in email subject Closed 2008-02-04

Associated revisions

Revision 17907
Added by Go MAEDA 4 months ago

New setting to include the status changes in issue mail notifications subject (#13111).

Patch by Marius BALTEANU.

Revision 17922
Added by Go MAEDA 3 months ago

Update locales (#13111, #30838).

Revision 18134
Added by Go MAEDA about 1 month ago

Fix tests to test Mailer.deliver_issue_edit instead of Mailer.deliver_issue_add (#13111, #31065).

Patch by Mizuki ISHIKAWA.

History

#1 Updated by Jan Niggemann (redmine.org team member) over 6 years ago

IIRC it's the same with Lotus notes / Domino...

#2 Updated by Sergejs Degtjars about 6 years ago

vote for this.
MS Outlook grouping also doesn't work with different subjects.

#3 Updated by Jongwook Choi almost 6 years ago

Just for a reference: #1401 does not work for gmail as of now.

For temporary monkey-patching, so that the mail subject does NOT contain status names, one can modify the 48th and 69th line of "app/models/mailer.rb" as follows:

@@ -48,1 +48,1 @@
-        :subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" 
+        :subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.subject}" 

@@ -69,1 +69,0 @@
-        s << "(#{issue.status.name}) " if journal.new_value_for('status_id')

I think it would be great if this behaviour can be configured in the application settings, just as different ways of displaying user names (USER_FORMATS in app/models/user.rb).
Hope I could work on this patch when I get time later...

#4 Updated by Peter Volkov almost 5 years ago

This is very close to #3660. Probably it's better to implement #3660 and fix this in one go.

#5 Updated by Peter Volkov almost 5 years ago

As for emails grouping in gmail, I found this blog post useful:
http://www.sensefulsolutions.com/2010/08/how-does-email-threading-work-in-gmail.html

#6 Updated by Toshi MARUYAMA almost 5 years ago

  • Related to Feature #3660: Configurable subject of notification email for issue_add/issue_edit added

#7 Updated by Hashem Nasarat 7 months ago

I disagree Peter Volkov; this is a longstanding usability issue; and if the fix is simply to remove a field from the email template that should not be blocked on a further enhancement.

If the maintainers agree this is reasonable I'll try to prepare a patch.

#8 Updated by Marius BALTEANU 4 months ago

Gmail is one of the most used email clients and I think it should be very nice to support email threading. The rule is simple, the subject of the email must be the same.

Go Maeda, do you think that we should do this configurable (ex: Show issue status in email notifications for issues) or we should just remove the status from the subject? IMO, I never found the status information from the subject useful.

#9 Updated by Go MAEDA 4 months ago

Marius BALTEANU wrote:

Go Maeda, do you think that we should do this configurable (ex: Show issue status in email notifications for issues) or we should just remove the status from the subject? IMO, I never found the status information from the subject useful.

I prefer making the subject line configurable rather than simply removing the status. The information that the status has been changed is useful for me.

I will try the patch in #17096#note-19 on my environment and check if the threading issue will be resolved.

#10 Updated by Marius BALTEANU 4 months ago

Go MAEDA wrote:

I prefer making the subject line configurable rather than simply removing the status. The information that the status has been changed is useful for me.

Thanks, I’ll prepare a patch.

I will try the patch in #17096#note-19 on my environment and check if the threading issue will be resolved.

For Gmail won’t work because the rule for threading uses only the subject, but I’m curios if it’ll fix the problem on Exchange/Office365.

#11 Updated by Go MAEDA 4 months ago

Marius BALTEANU wrote:

For Gmail won’t work because the rule for threading uses only the subject, but I’m curios if it’ll fix the problem on Exchange/Office365.

I have just confirmed that patch #17096#note-19 has no effect on Gmail. Unfortunately, I cannot test Exchange/Office365.

#12 Updated by Marius BALTEANU 4 months ago

Marius BALTEANU wrote:

Go MAEDA wrote:

I prefer making the subject line configurable rather than simply removing the status. The information that the status has been changed is useful for me.

Thanks, I’ll prepare a patch.

Attached the patch that adds a new setting to include the status changes in issue mail notifications subject.

The setting is useful to control the grouping of mails on some mail clients (Gmail for example).
By default, the setting is enabled to not change the current behaviour.

#13 Updated by Marius BALTEANU 4 months ago

#14 Updated by Marius BALTEANU 4 months ago

I can confirm that applying the patch on the current trunk fixes the thread issues on both major mail platforms:

1. Office 365

2. Gmail

Most probably, for Office 365 is not only the proposed patch, but also a fix available only on the current trunk.

#15 Updated by Marius BALTEANU 4 months ago

  • Related to Defect #17096: Issue emails cannot be threaded by some mailers due to inconsistent Message-ID and References field added

#16 Updated by Marius BALTEANU 4 months ago

  • Related to Patch #13658: include "In-Reply-To" field to aid email threading for some clients added

#17 Updated by Go MAEDA 4 months ago

#18 Updated by Go MAEDA 4 months ago

Marius, thank you for the patch. The patch works fine but I have one suggestion.

How about storing the setting value as an Array instead of an integer value, like Setting.notified_events? It is useful when we make the subject line more configurable in the future. For example, we may add a setting to show/hide a project name or tracker name.

#19 Updated by Marius BALTEANU 4 months ago

Go MAEDA wrote:

How about storing the setting value as an Array instead of an integer value, like Setting.notified_events? It is useful when we make the subject line more configurable in the future. For example, we may add a setting to show/hide a project name or tracker name.

I prefer to do a migration at that moment (it won't be a big deal) because we don't know (or at least me) how this feature will develop in the future. I see at least 3 options :) But if you really want to store it as Array, I can change my patch.

#20 Updated by Go MAEDA 4 months ago

Marius BALTEANU wrote:

I prefer to do a migration at that moment (it won't be a big deal) because we don't know (or at least me) how this feature will develop in the future.

It makes sense.

#21 Updated by Go MAEDA 4 months ago

  • Target version changed from Candidate for next major release to 4.1.0

#22 Updated by Go MAEDA 4 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for improving Redmine.

#23 Updated by Go MAEDA 4 months ago

  • Subject changed from Don't include new status for issues in email subject to New setting to include the status changes in issue mail notifications subject

#24 Updated by Go MAEDA 3 months ago

  • Related to Patch #31065: Fix tests that has incorrect verification target added

Also available in: Atom PDF