Closed Bug 428887 Opened 16 years ago Closed 16 years ago

accounts not listed in account order under the Get Mail button

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mkmelin, Assigned: jminta)

References

Details

(Keywords: regression)

Attachments

(1 file)

The accounts are no longer listed in account order under Get Mail. They now seem to be in some random order instead. (Also some non-existent news accounts are listed.)

Regression window 2008-04-10 03 -> 2008-04-10 03, so I suspect bug 413781.
Blocking-thunderbird3 since this is a regression, and it'd a fine thing to have this not regress in 3.0a1 as well.
Flags: wanted-thunderbird3.0a1+
Flags: blocking-thunderbird3+
(In reply to comment #0)
> The accounts are no longer listed in account order under Get Mail. They now
> seem to be in some random order instead. (Also some non-existent news accounts
> are listed.)
> 
> Regression window 2008-04-10 03 -> 2008-04-10 03, so I suspect bug 413781.
> 
Seeing this in Winxp also, including the extra News accounts.

OS: Linux → All
Can people clarify about "non-existent news accounts"?  Are these accounts that you have deleted or accounts that never were created? Or duplicates of accounts that still exist?
In my case , these must have been "artifacts" in my profile.
I had an account named "news" which showed up twice in the drop-down.
Had to delete the "single" news account that I saw there twice, then restart TB.
Now the list is accurate, just out of order.
For me too "non-existent" news accounts meant some accounts not seen in the account manager. They are named "news" - i think there is some old bug that generates such accounts when clicking news:// urls under some circumstances - I have never set them up manually. (I'll have to check later if there was other things in the list too.)
The "news" accounts are likely there due to bug 41133. For me it lists three of them, and also an extra RSS account. (Possibly an old deleted one, can't recall.)
(In reply to comment #6)
That makes sense.  I also wouldn't be surprised if these "news" accounts are the ones with null incomingServers, leading to these other bugs.  Magnus, do you know of some easy way to check whether an account is this weird semi-account? Does it have some property (or lack some property normal accounts would have)?

Not that I can think of, though is looks like the hostname is always "news" e.g. mail.server.server16.hostname;news
On second thought, it should be the ones *not* listed in mail.accountmanager.accounts. And that should also be the order the Get Mail button lists the accounts.
Attached patch patchSplinter Review
This patch will sort accounts, rather than the root folders for those accounts.  It also includes some bullet-proofing for bug 41133.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #316701 - Flags: review?(dmose)
Blocks: 429032
Marking as blocking-tb3a1 as it will fix 429032 which is already blocking.
Comment on attachment 316701 [details] [diff] [review]
patch

Looks good; r=dmose.


Please add a brief english description and/or ascii art description of the sort order in a comment so that it's possible to tell that the intended semantics are what's actually implemented.  This only occurred to me because it took me a bit to realize that intra-type, accounts are returned in their natural order and not sorted.
Attachment #316701 - Flags: review?(dmose) → review+
Whiteboard: [needs updated patch; checkin]
Comment added.

Checking in mail/base/content/mail-folder-bindings.xml;
/cvsroot/mozilla/mail/base/content/mail-folder-bindings.xml,v  <--  mail-folder-bindings.xml
new revision: 1.2; previous revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Seems to work fine here:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008042317 Thunderbird/3.0a1pre ID:2008042317
Yes, the accounts are now sorted like they used to, but the list includes the odd "news" accounts (and some removed rss account).
Whiteboard: [needs updated patch; checkin]
Comment on attachment 316701 [details] [diff] [review]
patch

>+            // Sadly, the accountMgr doesn't provide us we a sorted list of
>+            // accounts.  We have to get them in the right order on our own.
Sounds like you really need nsIMsgAccountManager.subFolders() ;-)

>               var acct = acctMgr.accounts.GetElementAt(i).QueryInterface(Ci.nsIMsgAccount);
Ooh, I missed this last time.
var acct = acctManager.accounts.QueryElementAt(i, Ci.nsIMsgAccount);
Or is that queryElementAt these days?

>+            // Our actual sorting function for accounts
>+            function accountCompare(a, b) {

>+              return 0;
You're lucky JS sort is stable these days (new for 1.9).

>+            // Now generate our folder-list.  Note that we'll special case this
>+            // situation below, to avoid destroying the sort order we just made
Perhaps sort (filter?) subfolders in this method's else block?
I suspect Thinderbird 13.0.1 regressed to this bug.
Since 13.0.1 the order in the Get Mail list is different from the order of the mail accounts (in the folder pane & the folderpane extension has no impact on the Get Mail order anymore).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: