Closed Bug 516143 Opened 12 years ago Closed 12 years ago

Smart folder doesn't remember its sort order

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: mossop, Assigned: Bienvenu)

Details

(Whiteboard: [no l10n impact])

Attachments

(2 files)

I am using the smart folders view. I see Inbox with inboxes from both of my accounts beneath it. The individual inboxes remember their sort order just fine however the smart inbox forgets as soon as you select a different folder and go back, it reverts to sorting by date in ascending order. It does remember to stay threaded though.
Flags: blocking-thunderbird3?
I don't see this.  Questions:
- Are you sorting by a custom column?
- Anything in the error console?
- I assume you do not have a quick-search applied when you change the sort?
- Do you have a mail-view applied?  My column sort changes actually do get saved with a mail-view applied, so this should not matter.  (If you only had one account and were doing this, then it would be bug 502767.)
- Do you have the folder toolbar or something other than the default buttons or the quick-search/gloda-search entry customized onto the toolbar?
- Are you using any extensions?
- Does this happen all the time (so just after restarting as well as after a while using Thunderbird)?
(In reply to comment #1)
> I don't see this.  Questions:
> - Are you sorting by a custom column?

I'm trying to sort by Date in descending order, but it always reverts to ascending. I have tried sorting by other columns too, it always changes back to Date in ascending order.

> - Anything in the error console?

No

> - I assume you do not have a quick-search applied when you change the sort?

Nope

> - Do you have a mail-view applied?  My column sort changes actually do get
> saved with a mail-view applied, so this should not matter.  (If you only had
> one account and were doing this, then it would be bug 502767.)

What is a mail-view?

> - Do you have the folder toolbar or something other than the default buttons or
> the quick-search/gloda-search entry customized onto the toolbar?

I tried resetting the toolbars but I still see the problem.

> - Are you using any extensions?

I disabled all my extensions and still see it.

> - Does this happen all the time (so just after restarting as well as after a
> while using Thunderbird)?

All the time, don't even need to restart, just selected a different folder and when you go back the sort order is wrong.
Note that this happens with all of hte global smart folders, Inbox, Drafts, Sent, Junk, Trash
I see this with my smart inbox - I can't convince it I don't want to sort by sender. I have junquilla installed, but I think I've seen this w/o junquilla. I'll try to dig into it but I've forgotten how the new view wrapper stuff handles sort order persistance...
Attached patch proposed fixSplinter Review
there are cases where we call rebuildview in response to a sort request, which calls OpenWithHdrs - the latter was not persisting the sort order. This fixes that. I think this might be a fairly visible issue with smart folders now the default so we might want to consider it for b4.

I'll go figure out which xpcshell test should be extended to test for this...
Assignee: nobody → bienvenu
Attachment #400550 - Flags: superreview?(bugzilla)
Attachment #400550 - Flags: review?(bugmail)
Whiteboard: [no l10n impact][has patch, needs review standard8]
Attachment #400550 - Flags: review?(bugmail) → review+
Attachment #400550 - Flags: superreview?(bugzilla)
Attachment #400550 - Flags: superreview+
Attachment #400550 - Flags: approval-thunderbird3+
fix checked in - I'm working on a test case.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [no l10n impact][has patch, needs review standard8] → [no l10n impact]
Attached patch add test caseSplinter Review
test that sorting threaded views persists...
Attachment #400598 - Flags: review?(bugmail)
Comment on attachment 400598 [details] [diff] [review]
add test case

good test, thank you.
Attachment #400598 - Flags: review?(bugmail) → review+
I'm marking checkin-needed so I can remember to land this after the tree opens for rc1.
Keywords: checkin-needed
Whiteboard: [no l10n impact] → [no l10n impact][land test case after b4]
Target Milestone: --- → Thunderbird 3.0b4
(In reply to comment #9)
> I'm marking checkin-needed so I can remember to land this after the tree opens
> for rc1.

I've checked this in: http://hg.mozilla.org/comm-central/rev/251c3501098c
Flags: in-testsuite?
Flags: in-testsuite+
Flags: blocking-thunderbird3?
Flags: blocking-thunderbird3+
Keywords: checkin-needed
Whiteboard: [no l10n impact][land test case after b4] → [no l10n impact]
You need to log in before you can comment on or make changes to this bug.