Closed Bug 478863 Opened 15 years ago Closed 9 years ago

Messages with future dates (>= tomorrow) badly break "Group by sort", missing group header string for "Future Dates"

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 43.0

People

(Reporter: cirillo, Assigned: alta88)

References

Details

(Whiteboard: [steps #2])

Attachments

(4 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
Build Identifier: Thunderbird 3.0 b1

when I sort messages by received date and group them by
order, group labels for messages whose received date is tomorrow or
later are not displayed right

Reproducible: Always
Are you using IMAP? If so, then this should be fixed by bug 402594
Version: unspecified → Trunk
Confirmed here on POP3

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090617 Lightning/1.0pre Shredder/3.0b3pre ID:20090617032054

Occur a number of strange things.

STP:
1. change date of pc to tomorrow and send an test email from an account (A) to another (B).

2. I remain to sent folder of A. In this case TB display above "Today" group a empty label as a collapsed group and I cannot open it;

3. I move to my inbox folder of A and return after to my sent box. Now I see ever an empty label but with the count of emails (see attached screenshot). Now I can collapse empty group above "Today".

4. Select "future" mail and try to delete from menu button: mail is marked an unred and not is deleted.

5. mark mail as read and delete: now empty label is named "Old Mail (-1/xxx)"
(see attached screenshot).

It is a solution to add group named "Future" above "Today" if an email has date next today? :-D
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [steps #2]
I forgot in STP in comment #2, that after I send message from A to B, I have close TB and restored the right date: this for simulate receive a mail from "future".
The "future" mail should probably just get grouped in to the Today group.
Well, IMO we should NOT group mails with future dates into the "Today" group because there's certainly something wrong with the date of such mails and so messing up today's group with them may not be the right thing to do.

Scenarios:
- mail was sent from friend where system date is accidentally future date
- mail was sent from spammer where system date is deliberately future date

For both scenarios, I definitely wouldn't want such mails to stay in the "today" group forever (if the future date is, say, 2015, such mails would always reoccur in the today group until 2015). This is also inconvenient because you will then never see your most recent mail on top of the list (or bottom, depending on sort order), as future mails will always stick there and confuse you. The truth is, we don't know if a future mail was sent today, or 2 weeks ago, or two years ago. Therefore, grouping them into a separate group labelled something like "Future" will provide a clear indication that these are mails with an invalid date, while avoiding interference with recent mails.
Summary: if received date is tomorrow, group labels are not displayed right → Messages with future dates (>= tomorrow) badly break "Group by sort", missing group header string for "Future Dates"
I encounter this bug from time to time, too. Usually I can’t open this unnamed group then (however, *sometimes* it works), and so I have no chance to see which mail I got until until I wait for the future mail to sorted into "Today" (or until I change the sorting resp. remove the grouping).

I think it would be a great solution to introduce a new group "Future" for such mails.
Attached patch futurama.patch (obsolete) — Splinter Review
This must be handled, but it's not clear if overhead of creating a string is worth it for a rare error/spoof case.
Attachment #8650432 - Flags: review?(rkent)
As a power user, I see this quite frequently I am afraid (spam, client time zone configuration issues and server configuration issues) and it is annoying. Putting those messages into "Today" makes sense, but I'd like to vote for a "Future" group, too. It would be an unusual and slightly counter-intuitive feature though, so I would not mind if it was hidden as an option in about:config (boolean: future messages into "Future" instead of "Today").
Comment on attachment 8650432 [details] [diff] [review]
futurama.patch

Review of attachment 8650432 [details] [diff] [review]:
-----------------------------------------------------------------

Two issues:

1) I realize in another case I encouraged you to not translate a string, but this particular case is sufficiently well defined that I think we should use the string "Future" with translation.

2) The patch does not actually work on my system, the symptom being that the group line with the "+" refuses to open. Tracing out, the issue is that nsMsgGroupView::GetAgeBucketValue is never setting the aAgeBucket, and presumably on my system that results in random values being used by the callers (perhaps the randomness is missing in your system). As a result, the header hash is random, and you cannot find the message thread. Solution is simple, just set a default value of 7 for the future case from nsMsgGroupView::GetAgeBucketValue

So this needs a couple of changes to be acceptable.
Attachment #8650432 - Flags: review?(rkent) → review-
Attached patch futurama.patchSplinter Review
updated, tested with 1 and more than 1 future date messages. note that same day future hours are still today.
Assignee: nobody → alta88
Attachment #8650432 - Attachment is obsolete: true
Attachment #8656952 - Flags: review?(rkent)
Comment on attachment 8656952 [details] [diff] [review]
futurama.patch

Looks good, thanks!
Attachment #8656952 - Flags: review?(rkent) → review+
Keywords: checkin-needed
Attached patch string.patchSplinter Review
one string for suite.
Attachment #8657447 - Flags: review?(ewong)
Attachment #8657447 - Flags: review?(ewong) → review+
https://hg.mozilla.org/comm-central/rev/869f9f6c4880120f10ef38529ca07f60682671df
Bug 478863 - Messages with future dates (>= tomorrow) badly break "Group by sort", missing group header string for "Future Dates". r=rkent

https://hg.mozilla.org/comm-central/rev/e30e0e85cf741271aeba2a1b4b14e91f93fadd68
Bug 478863 - Messages with future dates (>= tomorrow) badly break "Group by sort", missing group header string for "Future Dates", suite string. r=ewong
Status: NEW → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 43.0
You need to log in before you can comment on or make changes to this bug.