Closed Bug 1972709 Opened 1 year ago Closed 1 year ago

Incorrect order when manually sorting folder (after restart)

Categories

(Thunderbird :: Folder and Message Lists, defect, P1)

Thunderbird 141
Desktop
All
defect

Tracking

(thunderbird_esr140 unaffected, thunderbird139 unaffected, thunderbird140 unaffected, thunderbird141? affected)

RESOLVED FIXED
141 Branch
Tracking Status
thunderbird_esr140 --- unaffected
thunderbird139 --- unaffected
thunderbird140 --- unaffected
thunderbird141 ? affected

People

(Reporter: aleca, Assigned: aleca)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

Manual folder sorting seems broken.
When reordering a folder it looks fine at first but after restart (or a few minutes) all the folders get moved to a random order and it's impossible to get sort them back.
The outcome of any operation is unpredictable and apparently random.

I can reproduce this only on trunk, not on 139.
Can anyone reproduce on 140?

Marking this P1 and S1 because it's not possible to return to a normal order via the UI.

Flags: needinfo?(toby)
Flags: needinfo?(itagagaki)

Seems to work fine in TB 140 beta. Tested on a simple case in local and IMAP folders. Maybe related to the new database?

(In reply to Francesco from comment #1)

Seems to work fine in TB 140 beta. Tested on a simple case in local and IMAP folders. Maybe related to the new database?

Thanks for testing in 140.
The new database is not hooked to the folder pane yet.

Only imap seems affected (or at least easily reproducible) for.

Ok, we're on it. But this can easily happen again if no tests cover the functionality.

We'll try to get to that among our other priorities but Itagagaki, if you have any time, perhaps you could try to add some basic tests?

Flags: needinfo?(toby) → needinfo?(itagagaki)

Seems I broke it in bug 1970828. Will have to look into exactly why, as I don't see anything obvious... and why I can't reproduce on local folders.

Regressed by: 1970828
Summary: Incorrect order when manually sorting folder → Incorrect order when manually sorting folder (after restart)

Please also set actual version number when known, especially for regressions. This makes it much easier to query for issues that are relevant to specific versions.

Version: Trunk → Thunderbird 141

Martin pointed me to this where the comparison was backwards: https://hg-edge.mozilla.org/comm-central/rev/3fd0df28e520#l1.125
Will look at that tomorrow unless someone beats me to it. I guess a .reverse() call would do it.

(In reply to Toby Pilling [:tobyp] from comment #5)

Ok, we're on it. But this can easily happen again if no tests cover the functionality.

We'll try to get to that among our other priorities but Itagagaki, if you have any time, perhaps you could try to add some basic tests?

Bug 1957487 is open, but unassigned. Since I have never written a test for TB before, it will take me a while to figure out how to do it.
And since I don't have much time right now, it will be a while before I can start.

Flags: needinfo?(itagagaki)
Assignee: nobody → alessandro
Status: NEW → ASSIGNED

I will take care of bug 1957487 and add tests once this quick fix is in

Target Milestone: --- → 141 Branch

Pushed by edicharry@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/8a6800ba3889
Fix incorrect sorting when manually ordering folders. r=vineet

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: