Closed Bug 376453 Opened 17 years ago Closed 16 years ago

E-mail threading can be enhanced with references header

Categories

(Bugzilla :: Email Notifications, enhancement)

enhancement
Not set
normal

Tracking

()

VERIFIED FIXED
Bugzilla 3.0

People

(Reporter: arekm, Assigned: arekm)

References

()

Details

Attachments

(1 file, 3 obsolete files)

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>";
     }
Please attach your patch to the bug as a valid "cvs diff". If you require assistance with this, please ask.
OS: Linux → All
Hardware: PC → All
Version: unspecified → 3.0
Attached patch Add references headers (obsolete) — Splinter Review
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).
Assignee: email-notifications → misiek
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: email threading can be enhanced with references field → E-mail threading can be enhanced with references header
Attachment #260556 - Flags: review?(bugzilla-mozilla)
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.
Attachment #260556 - Flags: review?(bugzilla-mozilla) → review-
(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?
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. :)
(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)
Attached patch Updated patch (obsolete) — Splinter Review
Attachment #298794 - Flags: review?(bugzilla-mozilla)
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.
Attachment #298794 - Flags: review?(bugzilla-mozilla) → review+
Status: NEW → ASSIGNED
Flags: approval?
Target Milestone: --- → Bugzilla 3.2
Attached patch Patch v3 without tabs (obsolete) — Splinter Review
Sorry, my fault. I corrected the issue. Carrying over r+.
Attachment #260556 - Attachment is obsolete: true
Attachment #298794 - Attachment is obsolete: true
Attachment #301240 - Flags: review+
Does the patch apply cleanly to the 3.0.x branch? If yes, please request approval for the branch as well.
Let's take it on the 3.0 branch as this threading problem is irritating.
Flags: approval?
Flags: approval3.0+
Flags: approval+
Target Milestone: Bugzilla 3.2 → Bugzilla 3.0
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
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment on attachment 301240 [details] [diff] [review]
Patch v3 without tabs

This one didn't apply to HEAD. I used the previous patch instead.
Attachment #301240 - Attachment is obsolete: true
Keywords: relnote
I think this was relnoted in the appropriate 3.0.x release, and so doesn't need to be relnoted for 3.2.
Keywords: relnote
Added to the release notes for Bugzilla 3.2 in a patch on bug 432331.
Verified while watching current headers:

> In-Reply-To: <bug-376453-76551@https.bugzilla.mozilla.org/>
> References: <bug-376453-76551@https.bugzilla.mozilla.org/>
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.