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

RESOLVED FIXED in Thunderbird 43.0

Status

Thunderbird
Folder and Message Lists
--
major
RESOLVED FIXED
8 years ago
2 years ago

People

(Reporter: Luis, Assigned: alta88)

Tracking

Trunk
Thunderbird 43.0
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [steps #2])

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

8 years ago
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

Comment 1

8 years ago
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]
Created attachment 383896 [details]
empty grouped name above "Today" group

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".
Created attachment 383897 [details]
after deleting mail from "future" , empty group is named "Old Mail (-1/xxx)"
Duplicate of this bug: 307579

Updated

8 years ago
Duplicate of this bug: 507005

Comment 7

8 years ago
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"
Duplicate of this bug: 528016
Duplicate of this bug: 549707

Updated

7 years ago
Duplicate of this bug: 590163
Duplicate of this bug: 601844

Comment 13

4 years ago
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.
(Assignee)

Comment 14

2 years ago
Created attachment 8650432 [details] [diff] [review]
futurama.patch


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)

Comment 15

2 years ago
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 16

2 years ago
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-
(Assignee)

Comment 17

2 years ago
Created attachment 8656952 [details] [diff] [review]
futurama.patch

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 18

2 years ago
Comment on attachment 8656952 [details] [diff] [review]
futurama.patch

Looks good, thanks!
Attachment #8656952 - Flags: review?(rkent) → review+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed
(Assignee)

Comment 19

2 years ago
Created attachment 8657447 [details] [diff] [review]
string.patch

one string for suite.
Attachment #8657447 - Flags: review?(ewong)

Updated

2 years ago
Attachment #8657447 - Flags: review?(ewong) → review+

Comment 20

2 years ago
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

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 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.