Closed Bug 14295 Opened 25 years ago Closed 23 years ago

UI: Account Settings, Server Panel, username & Server Name not editable

Categories

(SeaMonkey :: MailNews: Account Configuration, defect, P2)

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: nbaca, Assigned: cavin)

References

()

Details

Attachments

(5 files)

Build 1999091709M11: Win32/NT4
(Linux and Mac: Will check with detail later)

Overview: The Account Settings Server Panels display the "Server Name:" and
"Username" for a POP and IMAP account but they are not editable. The News Server
panel displays the "Server Name:" but it is not editable.

Account Setup Spec
(http://gooey/client/5.0/specs/mail/accountSetup/accountSetup.html).

Expect:
1. When a POP or IMAP account's Server panel is selected then the "Server Name:"
and "User Name:" options should display the information in editable text boxes.

2. When a News account's Server panel is selected then the "Server Name:" option
should display the information in an editable text box.
QA Contact: lchiang → nbaca
QA Contact to nbaca.
Status: NEW → ASSIGNED
Target Milestone: M14
They will not be editable for PR1
Component: Front End → Account Manager
Target Milestone: M14 → M16
*** Bug 23128 has been marked as a duplicate of this bug. ***
News/NNTP server names were not editable in 4.x -- are we changing this for 5.0?
If so, will there be any rules or changes surrounding this to prevent weirdness
in news/NNTP files on disk?  For instance, if we edited a news/NNTP server name
would we create a new host-<server> directory or just edit the name of the
existing one?  I suppose this might be dependent on how we're doing
subscribe/newsgroups lists... anyway, please advise us when the time comes how
news/NNTP servers will be affected.
*** Bug 29957 has been marked as a duplicate of this bug. ***
Summary: Account Settings Dialog: Server Panel, Server Name not editable → UI: Account Settings, Server Panel, Server Name not editable
Priority: P3 → P2
*** Bug 35855 has been marked as a duplicate of this bug. ***
Mail Review recommends beta2 stopper.
Keywords: nsbeta2
Mass moving M16 to M17 - look for nsbeta2 before anything else.
Target Milestone: M16 → M17
Putting on [nsbeta2-] radar for beta2 fix.  If you'all feel differently, remove 
the [nsbeta2-] and tell us why this is critical to beta2.  Is this a new feature 
request for netscape 6?
Whiteboard: [nsbeta2-]
This is a new feature in Netscape 6. I don't think it's critical. Does anyone 
else feel differently?
actually in 4.5 you could edit the hostname of pop servers, and the username and 
type of every server..

This is kind of a hard thing to fix though and it's rare that someone actually 
has to change this so I'm in agreement with the nsbeta2-
Keywords: nsbeta3
Target Milestone: M17 → M18
Whiteboard: [nsbeta2-] → [nsbeta2-] [nsbeta3-]
Target Milestone: M18 → Future
*** Bug 57394 has been marked as a duplicate of this bug. ***
massive reassign of account manager bugs -> sspitzer
please feel free to put me back on the CC if you have any questions/comments
Assignee: alecf → sspitzer
Status: ASSIGNED → NEW
*** Bug 61154 has been marked as a duplicate of this bug. ***
adding "username" to summary.
Summary: UI: Account Settings, Server Panel, Server Name not editable → UI: Account Settings, Server Panel, username & Server Name not editable
Nominate for 6.5
Keywords: mail3, nsbeta1
we do need this, but heads up, I think it is going to be hard.

we use the hostname and the username in our uri's, which is going to make
switching them on the fly interesting.

accepting.
Status: NEW → ASSIGNED
Perhaps then we should examine *where* it should be possible to edit the server 
name if it's too hard in the settings dialog. Would it be easier to add a button 
next to the server name ("Edit Server") and take the user to the point in the 
Account Setup Wizard where they could re-enter the server name? Is this harder 
or easier?
the hard part isn't fixing the UI to allow the user to change the hostname or
username.  it's actually very easy to change the account settings UI to do that.

the hard part is making sure everything works after we do a host swap of the
username or hostname.  I haven't even begun to investigate just how hard that is
going to be.
we should at least look into the amount of time it will take.  We have similar
problems with rename folder when the folder has subfolders(the uri changes). We
might be able to do something similar.
I've got changes to the front end for this, and for now the text areas are
disabled since the back end can't handle it yet.  once it does, I'll remove the
disabled="true" from the text fields.
the ui has been fixed to allow users to change the username or hostname for as
erver, but it disabled it until the backend can handle a live swap of those
values.

that comes next.
*** Bug 63837 has been marked as a duplicate of this bug. ***
*** Bug 64102 has been marked as a duplicate of this bug. ***
*** Bug 64103 has been marked as a duplicate of this bug. ***
marking nsbeta1+ and moving to mozilla0.8

This always shows up in the feedback response as something that a lot of people
care about.  Let's look into it and see how much work it will be to make the
backend work.
Keywords: nsbeta2, nsbeta3
Whiteboard: [nsbeta2-] [nsbeta3-] → [nsbeta1+]
Target Milestone: Future → mozilla0.8
moving to mozilla0.9
Target Milestone: mozilla0.8 → mozilla0.9
Adding myself to CC
Adding faniz to CC (he asked me to do so)
marking nsbeta1- and moving to future milestone.
Keywords: nsbeta1nsbeta1-
Whiteboard: [nsbeta1+] → [nsbeta1+ 2/13]
Target Milestone: mozilla0.9 → Future
*** Bug 69019 has been marked as a duplicate of this bug. ***
I'd like to add that I think this would be a very useful feature. Just today a
coworker and I had to get my email working after our company changed email
servers (due to a merger). We had to delete and create about 6 mail accounts
before we got it working, simply because we couldn't edit the server name.
Keywords: 4xp, mozilla0.9
*** Bug 73596 has been marked as a duplicate of this bug. ***
Keywords: nsCatFood
Keywords: nsCatFoodnsCatFood+
*** Bug 81569 has been marked as a duplicate of this bug. ***
*** Bug 82753 has been marked as a duplicate of this bug. ***
12 dups. Marking mostfreq.
Keywords: mostfreq
*** Bug 83773 has been marked as a duplicate of this bug. ***
Normally this is used when creating new accounts and one does a typo in the
username/server name. The solution is easy... delete the account and create it
anew. (when solved, should be checked that the password is erased if the
username/server are changed...)
*** Bug 85151 has been marked as a duplicate of this bug. ***
*** Bug 86817 has been marked as a duplicate of this bug. ***
*** Bug 87948 has been marked as a duplicate of this bug. ***
Looks like we have many dup bugs for this. 
Is this Target Milestone still "Future"? 
Severity: normal → major
reassiging to cavin.
Assignee: sspitzer → cavin
Status: ASSIGNED → NEW
Whiteboard: [nsbeta1+ 2/13]
Target Milestone: Future → mozilla0.9.4
*** Bug 89830 has been marked as a duplicate of this bug. ***
*** Bug 89767 has been marked as a duplicate of this bug. ***
status update.

cavin's been researching this and he's going to write up a possible solution.

mscott has come up with an alternative approach, and I'll be writing up his 
solution.

we'll post both approaches and allow for some time to discuss them.
http://www.sspitzer.org/bug-14295.txt is a link to what I'm calling 
the "mscott" approach, since he came up with idea for how to do this for pop.

please review.  if you have comments, add them to the bug report and I'll 
respond and update the document.
adding mscott, putterman, racham, bienvenu, and naving to the cc list.

guys, please review http://www.sspitzer.org/bug-14295.txt and provide feedback.
>part 1 (pop):
>+++++++++++++

>here are the basics of the fix:

>a)  extend nsIMsgIncomingServer to have two new attributes:  realHostName and 
>realUsername.  like username and hostName,
 >   those attributes are reflected into prefs.

Please explain why do we need these extra prefs

>f) there's a bug right now where if you remove and add the same account back in 
>the same session, we have problems.
 >  (we're leaking the nsIRDFResources).  a similar bug exists here:  if you 
>change the hostname to foo and then back,
 >  you'll hit the same problem.  but that's a dup of an existing bug.

This is bug 72709 and we will need to fix this one before this feature should
be landed. 


> g) don't allow changing username / hostname when offline.  you don't want to
play back changes to a different server. 

Only if there are unsaved changed, if my last act was going offline, I should
still be able to change the username / hostname.

> for imap and news, the old folders / newsgroups are invalid.

For IMAP, yes, but not for news. If you are renaming the server instead of
adding a new one, then chances are it will have the same newsgroups, in which
case I don't want to download all the headers again. With IMAP this still
applies, but is much less of an issue (also, the unread messages are maintained
with IMAP, they aren't with NNTP).
With respect to news accounts, my requirement would be to have all newsgroup
subscriptions and downloaded messages preserved, where possible (maybe as an
option) when a server name is changed.

I've included my original bug report (dupe of this one) below to explain why:

-----------
Here's my problem - I have 2 (and soon 3) different dial up ISP accounts (for a
bit of resilience amongst other things).

Each ISP has their own news server for internet newsgroups, each only accessible
from that ISPs dial in lines.

So I have a Mozilla news account which specifies the name of my favourite ISP's
news server - but I can't read the newsgroups if I'm on my other ISP.  More
importantly, what if I change ISP permanently and don't want to lose my list of
subscribed internet newsgroups?

What would be great would to be able to change the name of the news server for
that account - surely this wouldnt be a problem as its safe to assume the
subscribed groups are available from either server? If there is some horrible
technical blocker here, I'd be interested to know..

Thinking about it, how about a generic "Internet Newsgroups" account into which
you added a list of all the possible news servers you might be able to access,
and then just select the correct/preferred server for the connection?
---------------

 
*** Bug 91999 has been marked as a duplicate of this bug. ***
This bug needs to be fixed. It is pain if you have to create a new account 
and you mess-up the settings. 
Adding "nsbranch" to keyword so this is considered for the next release.
Keywords: nsBranch
cavin, bienvenu and I meet to discuss the feedback and the design.

we've simplified the approach even more.  there will not be any cloning or 
removal of accounts, so filters will be preseved and for news, subscription 
lists will be preserved.

see http://www.sspitzer.org/bug-14295-v2.txt for an updated and simplified 
approach.
*** Bug 95075 has been marked as a duplicate of this bug. ***
*** Bug 95755 has been marked as a duplicate of this bug. ***
triage meeting --> we aren't taking this for eMojo. Moving to the next milestone.
Target Milestone: mozilla0.9.4 → mozilla0.9.5
Any reason why the status is still "new" (especially with so many important
keywords)? Just wondering.
Blocks: 99230
trying to shutdown feature work.  nsbranch should be removed.
chofmann: This is certainly no feature, it's a big hairy bug.
this is an old nsBranch keyword. We never intended this for the eMojo branch.
Taking off the old nomination. However it is a high priority item for the next
release after eMojo so leaving in .9.5.
Keywords: nsbeta1-, nsbranch
No longer blocks: 99230
*** Bug 100321 has been marked as a duplicate of this bug. ***
*** Bug 100845 has been marked as a duplicate of this bug. ***
*** Bug 101120 has been marked as a duplicate of this bug. ***
accepting (for cavin), he's working on this and making good progress.
Status: NEW → ASSIGNED
Depends on: 101640
The very 1st draft patch is coming.  sspitzer and bienvenu, can you review the 
patch? Thanks.
Attached patch 1st draft patch.Splinter Review
Wow that's awesome news Cavin! Do you mind if David and Seth (at least seth)
wait until monday or tuesday to review this? Seth is right in the middle of some
critical branch work and I hate to interrupt him.

our first feature for the next release! woohooo!
Blocks: 102231
Please see sspitzer's (v2) design document posted 2001-08-10 14:17 on how the 
patch works internally.

Both IMAP and POP accounts should work transparently to users after the user 
and/or server names have changed.  One thing to note is that the INBOX for the 
POP accounts will eventually contain messages from both old and new user/server 
email accounts. In other words, messages that were in INBOX prior to the 
user/server change remain in INBOX after the change is completed.

For the news accounts, it works transparently to users except the following 
issue:

All the subscribed news groups associated with the old server stay in the folder 
pane list, but the users won’t be able to read msgs/articles in these 
folders/groups anymore because the connection to the old server no longer exists 
and the groups do not belong to the new server either. The following error 
message is displayed in this case:
 
  Error!
  newsgroup server responded:Not in a newsgroup

  Perhaps the article has expired

  <9nik1a$knl$1@slb5.atl.mindspring.net> (23964)

  Click here to remove all expired articles

The users will have to manually unsubscribe the old groups themselves.  This is 
the way the patch works now and sspitzer and I are discussing a better way to 
handle this problem. Stay tuned for any possible solution.

Three alert messages have been created for the following scenarios (in the 
Server Settings page):

1. Users make changes to user and/or server names and the new user/server 
combination already exists for other account. Message for this scenario is:

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

2. Users have changed the user name and the new user/server combination does not 
already exist in the profile. Message for this scenario is:

  Your User Name has been updated. You may also need to update your
  Email Address and/or User Name associated with this account.

3. Users have changed the server name and at least one filter rule is defined 
for the profile, and the new user/server combination does not already exist in 
the profile. Message for this scenario is:

  The server name setting has changed. Please verify that any folders used
  by filters exist on the new server.

If both conditions for (2) and (3) are true then messages for scenarios (2) and 
(3) will be displayed in a single dialog (separated by a newline).  So the only 
time that no message is ever displayed is when only server name is changed and
no filter rule is defined for the profile.
> Do you mind if David and Seth (at least seth) wait until monday or tuesday to 
> review this? Seth is right in the middle of some critical branch work and I 
> hate to interrupt him.
>
No Problem.
One more thing to mention about the account name:

All occurrences of old user and/or server names in the account name will be 
replaced with the new user and/or server names (entered by the users).  For 
example, news account name "News on news.mcom.com" will become "News on 
news.mozilla.org" if the news server name is changed to "news.mozilla.org". 
Similarly, imap account name "IMAP - qatest20@nsmail-2" will become "IMAP - 
qatest33@nsmail-1" if the new user and server names are "qatest33" and 
"nsmail-1" respectively. Account name such as "My work account" will (most 
likely) stay the same because it does not contain any user and server specific 
names.
Moving to mozilla0.9.6.
Target Milestone: mozilla0.9.5 → mozilla0.9.6
I know that this bug is complex, but this bug has been pushed since M14!
Whats targets worth if they keep getting pushed... ?

my $0.02
I added code to unsubscribe and subscribe the existing groups (to the new 
server) to clean up the article numbers in the rc file. This is because the old 
and new servers may maintain different numbers for the same articles if both 
servers handle the same groups. A new patch is coming.
I'll review your patch later today.  I'm very excited that we have something in 
hand for this beast.

cavin, is http://www.sspitzer.org/bug-14295-v2.txt up to date?

I think it doesn't contain your new approach for handling news servers.

let me know what's out of date (or wrong) with http://www.sspitzer.org/bug-
14295-v2.txt and I fix it, and then put it on http://www.mozilla.org/mailnews, 
for future reference.
OK, I'll check and let you know.
cavin, you rock.  I can't wait for this feature to land.

1) kCImapHostSessionList

is there a contract id for that?

2)  can you get robinf to review these strings?

+modifiedAccountExists=An account with that user name and server name already 
exists. Please enter a different user name and/or server name.
+userNameChanged=Your User Name has been updated. You may also need to update 
your Email Address and/or User Name associated with this account.
+serverNameChanged=The server name setting has changed. Please verify that any 
folders used by filters exist on the new server.

perhaps we should just unconditionally put up a single alert when a username or 
hostname changes, letting them know what to check (filters, email addresses, 
etc)

3) FindRealServer should be findRealServer() in the idl  (interCaps)

you'll have to fix your js to use findRealServer() (from C++, it's still 
FindRealServer)

4)

can you fix this comment:

+// if the user has a : appended, then

it looked like if we called SetHostName with x:y, we parse it and use x for the 
hostname and y for the port.

now, how does it work?

it looks like GetRealHostName() will look at the hostname pref for a :
and if it finds it, it will call the setter (to parse?)

can you comment that code so it's clear what's going on?

5)

make sure nsNntpIncomingServer::DoUserServerChanges() does the right thing
if I'm not subscribed to any groups.  (it might return failure or assert or do 
work it doesn't need to)
cavin, can you make an old man happy and just do two simple for loops?

for (j=0; j<cnt; j++) {
  // unsubscribe
}

for (j=0; j<cnt; j++) {
  // subscribe
}

+  for (i=1; i<=2; i++)
+    for (j=0; j<cnt; j++)
+    {
+      // unsubscribe when i is 1.
+      groupList.StringAt(j, groupStr);
+      if (i == 1)
+        rv = Unsubscribe(groupStr.get());
+      else
+      {
+        cname.AssignWithConversion(groupStr.get());
+        rv = SubscribeToNewsgroup(cname.get());
+      }
+      NS_ENSURE_SUCCESS(rv,rv);
+    }
+  groupList.Clear();
Ok, seth, just do it for you.
1) kCImapHostSessionList, is there a contract id for that?

> No. The imap code has been using NS_IIMAPHOSTSESSIONLIST_CID.

2)  can you get robinf to review these strings?

> They have been reviewed by robinf.


3) FindRealServer should be findRealServer() in the idl  (interCaps)

> Fixed.

4) can you fix this comment:

+// if the user has a : appended, then

> Comment fixed.

5) make sure nsNntpIncomingServer::DoUserServerChanges() does the right thing
if I'm not subscribed to any groups.  (it might return failure or assert or do 
work it doesn't need to)

> I added the following code to simply return if there is nothing subscribed.

  // If nothing subscribed then we're done.
  if (groupList.Count() == 0)
    return NS_OK;

  // doing unsubscribe and subscribe stuff.
I don't know if you will be fixing bug 72709 as part of this feature because
we leak rdf resources on removing accounts and right now we have issued 
release notes to restart mail, when user removes and add backs the same account
in one session. I would suggest you look into that. I don't know if you have
already addressed this issue. 

No, I have not.
A new patch incorporating seth's comments is coming.
+NS_IMETHODIMP
+nsMsgAccountManager::FindRealServer(const char* username,
+                                const char* hostname,
+                                const char* type,
+                                nsIMsgIncomingServer** aResult)
+{
+  InternalFindServer(username, hostname, type, PR_TRUE, aResult);
+  return PR_TRUE;
+}

PR_TRUE is not an nsresult so this needs to change.

+{
+  // 1. Remove file hostinfo.dat so that the new subscribe 
+  //    list will be reloaded from the new server.
+  nsresult rv;
+  nsCOMPtr <nsIFileSpec> hostInfoFile;
+  rv = GetLocalPath(getter_AddRefs(hostInfoFile));
+
NS_ENSURE_SUCCESS(rv, rv);
+
rv = hostInfoFile->AppendRelativeUnixPath(HOSTINFO_FILE_NAME);
+  NS_ENSURE_SUCCESS(rv, rv);
+  hostInfoFile->Delete(PR_FALSE);

tabs here?

Does "DoUserServerChanges" mean HandleServerOrUsernameChanges? If so, that would
be a better name. DoUserServerChanges is a bit cryptic.

Other than that, looks OK but I'll look more closely at the final patch.
Blocks: 76066
Per David's comment about the use of two functions DoUserServerChanges and 
HandleUserServerChanges to accomplish the task of name change (instead of just 
one), I have modified the code a little bit to use only one interface method 
OnUserOrHostNameChanged for the same task. Basically, the derived class first 
invokes the base class to perform the common tasks and then does its own 
specific task. Everything else stays the same.  A patching is coming.
ok, looks good, sr=bienvenu. Have you tested what happens when both the user
name and server name change?
Comment on attachment 52736 [details] [diff] [review]
Incorporated david's comments.

r=sspitzer, sr=bienvenu
Attachment #52736 - Flags: superreview+
Attachment #52736 - Flags: review+
Fix checked into trunk.
Changing status.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Trunk build 2001-11-13-03: WinMe
Trunk buid 2001-11-09: Linux RH 7.1, Mac 9.1
Verified Fixed.

Mail Scenarios:
1. Server Name and User Name invalid, then changed to valid entries.
2. Server Name invalid, User Name valid, then changed to valid entry.
3. Server Name valid, User Name invalid, then changed to valid entry.

News Scenarios:
4. Server Name invalid, changed to a valid entry.
5. Server Name valid, changed to an invalid entry, changed back to a valid 
entry.
Status: RESOLVED → VERIFIED
What about editing the "Server Type"?
*** Bug 111125 has been marked as a duplicate of this bug. ***
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: