Closed Bug 62433 Opened 25 years ago Closed 24 years ago

Multiple mail accounts given the same name when migrated

Categories

(MailNews Core :: Profile Migration, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: xalkina, Assigned: racham)

References

Details

(Whiteboard: [nsbeta1+][PDT+])

Attachments

(5 files)

Installed linux/2000120808, after removing .mozilla. Mozilla migrated old mail accounts from ns4.76. There where two IMAP + local. Although the IMAP accounts where migrated correctly, they're migrated under the same name, namely that of the first account.
Reporter can you write out in step by step detai what you did?
Are you saying you got duplicate profile names listed in the profile manager dialog or that you got extra directories on disk for ImapMail + Mail? Because if it's the latter, we have existing bugs about the extra directories being created. ( bug 34516 and bug 50567 )
I did not check for directories, so I do not know. I currently am away of my primary machine so I cannot test or reproduce it and tell you. All I was saying is that, although in my ns configuration I have two profiles, one for xalkina@otenet.gr, my primary e-mail account, and one for Christos.Cheretakis@knowledge.gr, which is my account at work, the migration wizard created two accounts in mozilla, where both names are derived from xalkina@otenet.gr (can't check them now), but their parameters are correct. Ie, first one has server set to mail.otenet.gr, second to mail.knowledge.gr. I'll check for the directories as soon as I get back.
Assignee: sspitzer → racham
migration bugs to racham
Christos can you update us with any new information?
2001012606 changed behaviour to the worse! Here is what I did: - move .mozilla to .oldmozilla - run mozilla - it asks whether it should migrate existing ns4 profiles - when its done, there are two mail account profiles, with the exact same information previous build I checked with, migrated information correctly, but only missed the name.
Marking NEW as per comments.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reproduced on build 2001052115, Mac OS 9.1; --> All/All. Highly visible bug.
OS: Linux → All
Hardware: PC → All
Summary: Dupliacte names when migrating mail profiles → Multiple mail accounts given the same name when migrated
Marking nsbeta1 because this is too confusing. Buid 2001-05-22-04: WinMe Steps I used to reproduce the problem: 1. In 4.7 configure for one profile with 2 IMAP accounts (i.e. qatest22, qatest33) 2. To migrate the profile I used the -installer flag Actual Results: a. * When Mail starts I can see two accounts, both called qatest22@netscape.com. b. In Account Settings the settings for: - the first account is correct. All the panels reference qatest22. - * the second account's Identity panel is wrong, ref qatest22 - the second account's Server panel is correct, ref qatest33 - * the second account's Copies and folder panel is wrong, ref qatest22 c. Login to the first account and the login dialog references qatest22, as expected. d. Login to the second account and the login dialog references qatest33 and retrives the correct messages. 3. * Create a new message and all the identities reference qatest22 Note: Items with an "*" are specific areas that display problems.
Keywords: nsbeta1
Setting QA Contact to nbaca since this problem appears in Mail and not the Profile Manager. Note: In my previous scenario qatest22 and qatest33 use different mail servers.
QA Contact: gbush → nbaca
moving to 0.9.2
Priority: P3 → P2
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.2
This should get fixed, but seems to affect a small percentage overall. I'm comfortable with it being in 0.9.2, as opposed to 0.9.1.
adding PDT+
Whiteboard: [nsbeta1+] → [nsbeta1+][PDT+]
Status: NEW → ASSIGNED
Keywords: patch, review
*** Bug 84762 has been marked as a duplicate of this bug. ***
Is only the account name going to be affected or are we going to change anything in the identity panel, too? Although we here know that there was only one Identity information set in 4.x to migrate, it seems the folks which get confused by the same account name also get confused by the identity panel info being the same.
Sorry. I wanted to update this bug further but just got delayed... The patch I posted is going to effect only the Account Name (each account will have unique account name) that appears on folder pane, Account Central and the Account Settings panel's account name. Actually as you mentioned this is a single identity. It just has 2 imap accounts 4.x. We need to maintain the integrity without doing any data manipulations at identit level. So, the panels will look the same except for the Account name (& user & host names). I hope users sophisticated enough to manage 2 imap accounts in 4.x will understand the unchanged identity information.
if I used a previous version (without this patch) and I migrated (instead of using the wizard) the ".name" value for my imap server would not be set. so my imap server "name" (in the folder pane) would be "sspitzer@netscape.com". after this patch, if I start up again, the name would be "sspitzer@nsmail-1". it would have changed on our existing users. note, if the user used the wizard, they'd have set the pretty name and this wouldn't be a problem. Is this scenario a problem? changing the pretty name on users doesn't seem like a good thing. if we are ok with that, then this would be the right fix. otherwise, since we are worrying about migration, we could fix nsMessengerMigrator.cpp so that it sets the pretty name for imap servers on migration. this would make it so that only new users are effected. postscript: please, let's not even talk about what happens to users who have two accounts with the same username and hostname, but different ports.
this is the right idea, but you've made base/src depend on imap. what you really want is to add this to the nsIMsgIncomingServer interface: // only used during migration wstring prettyName generatePrettyNameForMigration(); in the base implementation in nsMsgIncomingServer, you'd return NS_ERROR_NOT_IMPLEMENTED. in the nsImapIncomingServer.cpp, you'd override it to return "username@hostname" [see below] right now, the only place we'd call GeneratePrettyNameForMigration() would be where you're calling GetPrettyNameForImapAccount(). but do it AFTER the call to set the server port. here's why: back to my previous comment about "let's not even talk about what happens to users who have two accounts with the same username and hostname, but different ports." you can address that if you make the imap implementation of GeneratePrettyNameForMigration() do this: prettyName = username + "@" + hostname; if (port != default_port) { prettyName += ":" + port; } keep in mind default_port will change if the server is secure or not.
this looks better, but you don't need those parameters to generatePrettyNameForMigration() It should be + wstring generatePrettyNameForMigration(); in the implementation [nsImapIncomingServer::GeneratePrettyNameForMigration()], you should get the port, [GetPort()], figure out if the server is secure [GetIsSecure()] and get the default port (secure or not) from the protocol info. there is no reason to pass that in, since you call GeneratePrettyNameForMigration() after port and isSecure are set. (you should add a comment above the call to GeneratePrettyNameForMigration() in nsMessengerMigrator.cpp that GeneratePrettyNameForMigration() has to be called after port and isSecure is set.
two minor comments: 1) + if ((serverPort == defaultServerPort) || + ((serverPort == defaultSecureServerPort) && isSecure)) { + isItDefaultPort = PR_TRUE; + } that should be if (((serverPort == defaultServerPort) && !isSecure) || ((serverPort == defaultSecureServerPort) && isSecure))) 2) I think you can remove a string copy in nsImapIncomingServer::GetFormattedName() I think you can do just this: +// Take the pretty name and return a formatted account name +nsresult +nsImapIncomingServer::GetFormattedName(const PRUnichar *prettyName, PRUnichar **retval) +{ + const PRUnichar *formatStrings[] = + { + prettyName, + }; + rv = m_stringBundle->FormatStringFromID(IMAP_DEFAULT_ACCOUNT_NAME, + formatStrings, 1, + retval); + NS_ENSURE_SUCCESS(rv, rv); + } + return rv; }
got rid of now unused + nsXPIDLString formattedName; also.
sr=sspitzer on the last patch.
Navin is currently reviewing the patch.
Whiteboard: [nsbeta1+][PDT+] → [nsbeta1+][PDT+]Have Fix, have sr=, need r= & approval after that
r=naving; although I am not sure if port stuff is really required.
a= asa@mozilla.org for checkin to the trunk. (on behalf of drivers)
Blocks: 83989
Marking Fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: [nsbeta1+][PDT+]Have Fix, have sr=, need r= & approval after that → [nsbeta1+][PDT+]
Build 2001-06-22-11: NT4 (Fenella's system) Build 2001-06-22-04: Mac 9.04 Build 2001-05-22-06: Linux RH 6.2 Verified Fixed. The accounts appear unique in the folder pane and Account Settings.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: