Last Comment Bug 478863 - Messages with future dates (>= tomorrow) badly break "Group by sort", missing group header string for "Future Dates"
: Messages with future dates (>= tomorrow) badly break "Group by sort", missing...
Status: RESOLVED FIXED
[steps #2]
:
Product: Thunderbird
Classification: Client Software
Component: Folder and Message Lists (show other bugs)
: Trunk
: x86 Windows XP
-- major (vote)
: Thunderbird 43.0
Assigned To: alta88
:
:
Mentors:
: 307579 507005 528016 549707 590163 601844 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-17 04:07 PST by Luis
Modified: 2015-09-07 02:44 PDT (History)
16 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
empty grouped name above "Today" group (64.26 KB, image/jpeg)
2009-06-18 04:25 PDT, [:Aureliano Buendía]
no flags Details
after deleting mail from "future" , empty group is named "Old Mail (-1/xxx)" (71.99 KB, image/jpeg)
2009-06-18 04:27 PDT, [:Aureliano Buendía]
no flags Details
futurama.patch (1.10 KB, patch)
2015-08-20 05:56 PDT, alta88
rkent: review-
Details | Diff | Splinter Review
futurama.patch (2.78 KB, patch)
2015-09-03 20:51 PDT, alta88
rkent: review+
Details | Diff | Splinter Review
string.patch (863 bytes, patch)
2015-09-05 08:51 PDT, alta88
ewong: review+
Details | Diff | Splinter Review

Description User image Luis 2009-02-17 04:07:12 PST
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 User image hansen 2009-03-14 17:47:47 PDT
Are you using IMAP? If so, then this should be fixed by bug 402594
Comment 2 User image [:Aureliano Buendía] 2009-06-18 04:13:30 PDT
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
Comment 3 User image [:Aureliano Buendía] 2009-06-18 04:25:59 PDT
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".
Comment 4 User image [:Aureliano Buendía] 2009-06-18 04:27:20 PDT
Created attachment 383897 [details]
after deleting mail from "future" , empty group is named "Old Mail (-1/xxx)"
Comment 5 User image Wayne Mery (:wsmwk, NI for questions) 2009-07-12 03:31:24 PDT
*** Bug 307579 has been marked as a duplicate of this bug. ***
Comment 6 User image [:Aureliano Buendía] 2009-07-28 23:59:53 PDT
*** Bug 507005 has been marked as a duplicate of this bug. ***
Comment 7 User image Magnus Melin 2009-07-29 10:22:58 PDT
The "future" mail should probably just get grouped in to the Today group.
Comment 8 User image Thomas D. (currently busy elsewhere; needinfo?me) 2010-01-28 02:45:35 PST
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.
Comment 9 User image Thomas D. (currently busy elsewhere; needinfo?me) 2010-01-28 02:54:47 PST
*** Bug 528016 has been marked as a duplicate of this bug. ***
Comment 10 User image Nathan Tuggy (:tuggyne) 2010-03-02 21:22:23 PST
*** Bug 549707 has been marked as a duplicate of this bug. ***
Comment 11 User image [:Aureliano Buendía] 2010-08-31 04:04:08 PDT
*** Bug 590163 has been marked as a duplicate of this bug. ***
Comment 12 User image Ludovic Hirlimann [:Usul] 2010-10-07 07:51:16 PDT
*** Bug 601844 has been marked as a duplicate of this bug. ***
Comment 13 User image db 2013-06-13 01:17:13 PDT
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.
Comment 14 User image alta88 2015-08-20 05:56:42 PDT
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.
Comment 15 User image info 2015-08-21 04:33:58 PDT
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 User image Kent James (:rkent) 2015-09-03 17:28:10 PDT
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.
Comment 17 User image alta88 2015-09-03 20:51:28 PDT
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.
Comment 18 User image Kent James (:rkent) 2015-09-04 13:49:22 PDT
Comment on attachment 8656952 [details] [diff] [review]
futurama.patch

Looks good, thanks!
Comment 19 User image alta88 2015-09-05 08:51:36 PDT
Created attachment 8657447 [details] [diff] [review]
string.patch

one string for suite.
Comment 20 User image aleth [:aleth] 2015-09-07 02:41:21 PDT
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

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