Note: There are a few cases of duplicates in user autocompletion which are being worked on.

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

RESOLVED FIXED in Thunderbird 15.0

Status

MailNews Core
Account Manager
--
minor
RESOLVED FIXED
11 years ago
5 years ago

People

(Reporter: Andrew Kositsky, Assigned: aceman)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 15.0
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

4.85 KB, patch
aceman
: review+
Details | Diff | Splinter Review
(Reporter)

Description

11 years ago
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)

Comment 1

9 years ago
exist on version 3.0a1pre (2008040903)
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

9 years ago
Version: unspecified → Trunk

Updated

9 years ago
Assignee: mscott → nobody
(Assignee)

Comment 2

6 years ago
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
Component: Account Manager → Account Manager
OS: Windows XP → All
Product: Thunderbird → MailNews Core
QA Contact: account-manager → account-manager
Hardware: x86 → All
(Assignee)

Comment 3

5 years ago
Created attachment 619452 [details] [diff] [review]
patch

This should do it. No visual changes intended.
Attachment #619452 - Flags: review?(iann_bugzilla)
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED

Comment 4

5 years ago
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-
(Assignee)

Comment 5

5 years ago
There were tons of checks before but I found them superfluous.
The .trim will take care of the leading newlines.

Comment 6

5 years ago
(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)
(Assignee)

Comment 7

5 years ago
Created attachment 620476 [details] [diff] [review]
patch v2

Both ways seem to work.
Attachment #619452 - Attachment is obsolete: true
Attachment #620476 - Flags: review?(iann_bugzilla)

Updated

5 years ago
Attachment #620476 - Flags: review?(iann_bugzilla) → review+
(Assignee)

Updated

5 years ago
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+
(Assignee)

Comment 9

5 years ago
Created attachment 623803 [details] [diff] [review]
patch v3

Thanks, done.
Attachment #620476 - Attachment is obsolete: true
Attachment #623803 - Flags: review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/81a3ad828425
Status: ASSIGNED → RESOLVED
Last Resolved: 5 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.