Closed Bug 346263 Opened 18 years ago Closed 12 years ago

While changing account settings for an IMAP mail account, I was not allowed to change the case of either the username or servername

Categories

(MailNews Core :: Account Manager, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 15.0

People

(Reporter: kositsky, Assigned: aceman)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Thunderbird/version 1.5.0.5 (20060719)

While changing account settings for an IMAP mail account, I was not allowed to change the case of either the username or servername.

I got an error message

"An account with that user name and server name already exists. Please enter a different user name and/or server name."

even though I was changing the account to which the error message is refering.  If I change the server or user name (say by putting in an extra letter,) I can then change back to the original server or user name in whatever case I want.

Reproducible: Always

Steps to Reproduce:
1. set up a new IMAP mail account with some arbitrary user name and server name (e.g. user name = bob, server name = incoming mail server = foo.bar.com)
2. Close account settings (this step may or may not be necessary; saving may be all that is necessary.)
3. reopen account settings, go to server settings on the account in question
4. try to change Server Name from "foo.bar.com" to "Foo.bar.com"

Actual Results:  
I received the error:
"An account with that user name and server name already exists. Please enter a different user name and/or server name."

Expected Results:  
The software should allow changing the case of server names.

standard installation of windows XP, default everything in Thunderbird (as for as I know)
exist on version 3.0a1pre (2008040903)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
Assignee: mscott → nobody
Interestingly, if you change case of both server and username, that change will be allowed.

There is a check to disallow setting server+user combination to the same combination existing in other account. But in the report it looks like the combination in one account is colliding with itself. I'll look into this.
Assignee: nobody → acelists
Blocks: 238583
OS: Windows XP → All
Product: Thunderbird → MailNews Core
QA Contact: account-manager → account-manager
Hardware: x86 → All
Attached patch patch (obsolete) — Splinter Review
This should do it. No visual changes intended.
Attachment #619452 - Flags: review?(iann_bugzilla)
Status: NEW → ASSIGNED
Comment on attachment 619452 [details] [diff] [review]
patch

On code inspection only, no testing as yet.
>+      let changeText = "";
>+      if ((oldHost != newHost) &&
>+          (filterList != undefined) && filterList.filterCount)
>+        changeText = prefBundle.getString("serverNameChanged");
>       if (oldUser != newUser)
>+        changeText = changeText + "\n\n" + prefBundle.getString("userNameChanged");
Don't you need to check that changeText is not "" before adding "\n\n" otherwise your alert will have two new lines at the beginning?
Attachment #619452 - Flags: review?(iann_bugzilla) → review-
There were tons of checks before but I found them superfluous.
The .trim will take care of the leading newlines.
(In reply to :aceman from comment #5)
> There were tons of checks before but I found them superfluous.
> The .trim will take care of the leading newlines.

Sorry, I missed that last change.
I believe it should be changeText.trim() not String.trim(changeText)
Attached patch patch v2 (obsolete) — Splinter Review
Both ways seem to work.
Attachment #619452 - Attachment is obsolete: true
Attachment #620476 - Flags: review?(iann_bugzilla)
Attachment #620476 - Flags: review?(iann_bugzilla) → review+
Attachment #620476 - Flags: review?(mconley)
Comment on attachment 620476 [details] [diff] [review]
patch v2

Review of attachment 620476 [details] [diff] [review]:
-----------------------------------------------------------------

Just two nits - but otherwise, from inspection, this looks good.

Great work, as usual.

::: mailnews/base/prefs/content/AccountManager.js
@@ +259,5 @@
> + * Check if the user and/or host names have been changed and if so check
> + * if the new names already exists for an account or are empty.
> + * Also check if the Local Directory path was changed.
> + *
> + * @param showAlert  show and alert if any problem with server/user name is found?

I think I'd prefer this @param def'n to be:

show an alert if a problem with the host / user name is found.

@@ +360,1 @@
>  

Let's put a comment here saying that any extraneous whitespace will be trimmed off before showing the message.
Attachment #620476 - Flags: review?(mconley) → review+
Attached patch patch v3Splinter Review
Thanks, done.
Attachment #620476 - Attachment is obsolete: true
Attachment #623803 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/81a3ad828425
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 15.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: