Last Comment Bug 376453 - E-mail threading can be enhanced with references header
: E-mail threading can be enhanced with references header
Status: VERIFIED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Email Notifications (show other bugs)
: 3.0
: All All
: -- enhancement (vote)
: Bugzilla 3.0
Assigned To: Arkadiusz Miskiewicz
: default-qa
Mentors:
http://rfc.net/rfc2822.html#s3.6.4.
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-04 00:24 PDT by Arkadiusz Miskiewicz
Modified: 2008-07-01 14:27 PDT (History)
8 users (show)
LpSolit: approval+
LpSolit: approval3.0+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Add references headers (691 bytes, patch)
2007-04-04 00:34 PDT, Arkadiusz Miskiewicz
bugzilla-mozilla: review-
Details | Diff | Review
Updated patch (1.06 KB, patch)
2008-01-23 15:17 PST, Henrik Skupin (:whimboo)
bugzilla-mozilla: review+
Details | Diff | Review
Patch v3 without tabs (1.07 KB, patch)
2008-02-04 01:22 PST, Henrik Skupin (:whimboo)
hskupin: review+
Details | Diff | Review
Patch for 3.0 (no code change) (759 bytes, patch)
2008-02-04 04:31 PST, Olav Vitters
no flags Details | Diff | Review

Description Arkadiusz Miskiewicz 2007-04-04 00:24:25 PDT
User-Agent:       Opera/9.20 (X11; Linux i686; U; en)
Build Identifier: bugzilla 3.0rc1

Currently in email notification only:
In-Reply-To:
header is added. This makes most of email clients to nicely thread email notifications coming from single bug... but ONLY if you have that first email notification with proper Message-Id.

I'm proposing adding References field also which allows for some MUAs to still do proper threading even if first notification email was already deleted. Such MUA is for example mutt.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.



Works, tested with mutt:

--- BugMail.pm~ 2007-04-04 09:00:37.380613717 +0200
+++ BugMail.pm  2007-04-04 09:05:47.297681433 +0200
@@ -629,7 +629,7 @@
     if ($isnew) {
         $threadingmarker = "Message-ID: <bug-$id-" . $user->id . "$sitespec>";
     } else {
-        $threadingmarker = "In-Reply-To: <bug-$id-" . $user->id . "$sitespec>";
+        $threadingmarker = "In-Reply-To: <bug-$id-" . $user->id . "$sitespec>\nReferences: <bug-$id-" . $user->id . "$sitespec>";
     }
Comment 1 Reed Loden [:reed] (use needinfo?) 2007-04-04 00:26:33 PDT
Please attach your patch to the bug as a valid "cvs diff". If you require assistance with this, please ask.
Comment 2 Arkadiusz Miskiewicz 2007-04-04 00:34:47 PDT
Created attachment 260556 [details] [diff] [review]
Add references headers
Comment 3 Reed Loden [:reed] (use needinfo?) 2007-04-04 00:39:39 PDT
Ok, diff looks good, but now you need to request review from somebody. If you click on the "Details" link next to the attachment, you can set the review flag to "?" and enter an address to request review from. For a list of people you can request review from, check out "http://www.bugzilla.org/docs/reviewer-list.html#libraries-general". You just need one, so pick one of the three (one of the first two is probably better).
Comment 4 Olav Vitters 2007-04-08 07:31:30 PDT
Comment on attachment 260556 [details] [diff] [review]
Add references headers

>Index: ./Bugzilla/BugMail.pm

>+        $threadingmarker = "In-Reply-To: <bug-$id-" . $user->id . "$sitespec>\nReferences: <bug-$id-" . $user->id . "$sitespec>";

Please do not make lines longer than 80 chars.
Comment 5 Olav Vitters 2007-04-08 07:35:48 PDT
(In reply to comment #0)
> I'm proposing adding References field also which allows for some MUAs to still
> do proper threading even if first notification email was already deleted. Such
> MUA is for example mutt.

That is not true, Mutt properly threads such messages regardless if the initial message was received or not. Is there some other client which only has this behaviour differently for In-Reply-To vs References?
Comment 6 Teemu Mannermaa (:wicked) 2007-04-08 21:06:59 PDT
Looking at RFC2822 section 3.6.4 that deals with these headers it seems that adding References in addition to In-Reply-To is the correct way. In fact, we even SHOULD be doing that. Also, adding only the Message-ID of our "parent message" (which is always the new bugmail sent to a specific user) is correct because our parent doesn't itself have any In-Reply-To or References header.

Note that Thunderbird has trouble threading if the parent message goes missing (or even if parent comes after the reply in the mbox file!) but adding References will not help it. Only fixing bug 181446 will. :)
Comment 7 Wayne Mery (:wsmwk, NI for questions) 2007-09-26 17:44:39 PDT
(In reply to comment #6)
>...
> Note that Thunderbird has trouble threading if the parent message goes missing
> (or even if parent comes after the reply in the mbox file!) but adding
> References will not help it. Only fixing bug 181446 will. :)

bug 181446 got fixed  2007-08-03, by Teemu of course.

I look forward to this bug getting fixed, as broken bugmail threads are now more common (I guess because of the UTF changes)
Comment 8 Henrik Skupin (:whimboo) 2008-01-23 15:17:18 PST
Created attachment 298794 [details] [diff] [review]
Updated patch
Comment 9 Olav Vitters 2008-02-04 00:32:20 PST
Comment on attachment 298794 [details] [diff] [review]
Updated patch

r=bkor. This correctly adds the header.

WARNING: Seems to use tabs instead of spaces, can be fixed on checkin.
Comment 10 Henrik Skupin (:whimboo) 2008-02-04 01:22:06 PST
Created attachment 301240 [details] [diff] [review]
Patch v3 without tabs

Sorry, my fault. I corrected the issue. Carrying over r+.
Comment 11 Frédéric Buclin 2008-02-04 03:28:39 PST
Does the patch apply cleanly to the 3.0.x branch? If yes, please request approval for the branch as well.
Comment 12 Olav Vitters 2008-02-04 04:31:57 PST
Created attachment 301258 [details] [diff] [review]
Patch for 3.0 (no code change)
Comment 13 Frédéric Buclin 2008-02-04 04:36:30 PST
Let's take it on the 3.0 branch as this threading problem is irritating.
Comment 14 Olav Vitters 2008-02-04 04:46:00 PST
3.0 branch:

Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v  <--  BugMail.pm
new revision: 1.104.2.3; previous revision: 1.104.2.2
done


HEAD:

Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v  <--  BugMail.pm
new revision: 1.116; previous revision: 1.115
done
Comment 15 Olav Vitters 2008-02-04 04:47:53 PST
Comment on attachment 301240 [details] [diff] [review]
Patch v3 without tabs

This one didn't apply to HEAD. I used the previous patch instead.
Comment 16 Max Kanat-Alexander 2008-06-30 23:27:06 PDT
I think this was relnoted in the appropriate 3.0.x release, and so doesn't need to be relnoted for 3.2.
Comment 17 Max Kanat-Alexander 2008-07-01 00:07:50 PDT
Added to the release notes for Bugzilla 3.2 in a patch on bug 432331.
Comment 18 Henrik Skupin (:whimboo) 2008-07-01 14:27:50 PDT
Verified while watching current headers:

> In-Reply-To: <bug-376453-76551@https.bugzilla.mozilla.org/>
> References: <bug-376453-76551@https.bugzilla.mozilla.org/>

Note You need to log in before you can comment on or make changes to this bug.