Closed
Bug 53216
Opened 24 years ago
Closed 22 years ago
AB:Display names typed into Mailing list disappear after closing
Categories
(SeaMonkey :: MailNews: Address Book & Contacts, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.4alpha
People
(Reporter: marina, Assigned: shliang)
References
Details
(Whiteboard: [adt2] nab-mlist)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
sspitzer
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
**** observed with 2000-09-19-09 build ****
Steps to reproduce:
- Edit existing Mailing List by typing into it new names (Display Name followed
by email address for ex: alex smith <iqawin1@netscape.com>);
- close Mailing list by OK'ing it;
- re-open it (or send Mail, get it and observe):
//note: all Display Names that you typed into the List are stripped off leaving
the email addresses only
Comment 1•24 years ago
|
||
Is this a regression?
The display name should be entered through New Card or Edit Card. Mailing list
dialog only get the email address from the mailing list. It is not a
regression.
In that case we have to language it differently , now when when you open a
Mailing List it says : type names or drag/drop addresses into the Mailing list
below". Type names could be understood as a possibilty to enter Display names
there
Yes, basically is the same. Mailing list dialog doesn't pasre the entered
string to get the display name if there's one.
Status: NEW → ASSIGNED
Comment 9•23 years ago
|
||
What is the solution for this bug? Are we going to allow Display Names when
creating a list or does the text need to change in the dialog?
Marking nsbeta1 because it should be more clear.
Keywords: nsbeta1
Updated•23 years ago
|
Whiteboard: nab-mlist
Updated•23 years ago
|
Comment 10•23 years ago
|
||
I definitely think you should be able to type in whatever name you want when
creating or editing a mailing list. This is a bug and not a feature. :-)
Updated•23 years ago
|
Comment 11•22 years ago
|
||
Marking nsbeta1 so that the Display Name is retained.
Comment 12•22 years ago
|
||
Mail triage team: nsbeta1+/adt2
Assignee | ||
Comment 15•22 years ago
|
||
Attachment #113042 -
Flags: superreview?(sspitzer)
Attachment #113042 -
Flags: review?(cavin)
Comment 16•22 years ago
|
||
Comment on attachment 113042 [details] [diff] [review]
patch
r=cavin.
Attachment #113042 -
Flags: review?(cavin) → review+
Assignee | ||
Comment 17•22 years ago
|
||
Attachment #113042 -
Attachment is obsolete: true
Attachment #113042 -
Flags: superreview?(sspitzer)
Attachment #113042 -
Flags: review+
Attachment #113255 -
Flags: superreview?(sspitzer)
Attachment #113255 -
Flags: review?(cavin)
Comment 18•22 years ago
|
||
Comment on attachment 113255 [details] [diff] [review]
patch
r=cavin.
Attachment #113255 -
Flags: review?(cavin) → review+
Comment 19•22 years ago
|
||
Comment on attachment 113255 [details] [diff] [review]
patch
1)
+ nsXPIDLString name;
+ pCard->GetDisplayName(getter_Copies(name));
+ if (name) {
+ AddDisplayName(pCardRow, NS_ConvertUCS2toUTF8(name).get());
+ err = m_mdbPabTable->AddRow(GetEnv(), pCardRow);
+ }
Because name is a nsXPIDLString, I think you want:
if (!name.IsEmpty()) {
instead of
if (name) {
2)
What happens if the user add a display name to an email address that was
already in the list?
(does your code do the right thing?)
3)
+ if (beginpos != 0) {
+ var name = fieldValue.slice(0, beginpos - 1);
+ cardproperty.displayName = name;
+ }
actually, the whole "if (cardproperty) {}" block (which you are adding to) has
a problem.
we are parsing the line by hand, and we need to use the header parser.
(there can be escaped characters and other things that simple parsing won't
catch.)
here's the start of what I think we should do:
var gMsgHeaderParser =
Components.classes["@mozilla.org/messenger/headerparser;1"].getService(Componen
ts.interfaces.nsIMsgHeaderParser);
...
if (cardproperty)
{
var numAddresses = gMsgHeaderParser.parseHeadersWithArray(emailAddresses,
addresses, names, fullNames);
var addresses = {};
var fullNames = {};
var names = {};
var numAddresses = msgHeaderParser.parseHeadersWithArray(fieldValue,
addresses, names, fullNames);
// numAddresses should always be 1, right?
cardproperty.primaryEmail = addresses.value[0];
cardproperty.displayName = names.value[0];
if (doAdd || (doAdd == false && pos >= oldTotal))
mailList.addressLists.AppendElement(cardproperty);
pos++;
}
can you try that out?
numAddresses should be 1, but might not be if the line is blank
or if the user does something like "foo@bar.com,cheese@test.com" on a line.
Can you investigate?
Attachment #113255 -
Flags: superreview?(sspitzer) → superreview-
Assignee | ||
Comment 20•22 years ago
|
||
2. What happens if the user add a display name to an email address that was
already in the list? (does your code do the right thing?)
yes this works.
3. using the msg header parser now, in most cases numAddresses is 1, otherwise
only the first one entered in the line is added.
Attachment #113255 -
Attachment is obsolete: true
Comment 21•22 years ago
|
||
Comment on attachment 113635 [details] [diff] [review]
patch
sr=sspitzer, thanks shuehan
Attachment #113635 -
Flags: superreview+
Attachment #113635 -
Flags: review+
Assignee | ||
Comment 22•22 years ago
|
||
marking fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 23•22 years ago
|
||
Trunk build 2003-03-03: WinXP, Linux RH 8
These are the results so far. I'm not sure If this is what is expected:
1. In a list dialog type a display name followed by an email address and it is
retained after closing/reopening the list (i.e. John Smith <smith@test.com>)
2a. In a list dialog type two address one one line, separated by a comma and
only the first address remains (i.e. test1@ns.com, test2@ns.com --> results in
test1@ns.com remaining but test2@ns.com is gone)
2b. Performed the same test as 2a except these entries include the display name
and only the first display name/email address is retained (i.e. John Smith
<test1@ns.com>, John Smith2 <test2@ns.com> --> results in John Smith
<test1@ns.com> remaining but John Smith2 <test2@ns.com> is gone)
Comment 24•22 years ago
|
||
Verified Fixed. I checked with shliang and this is the expected behavior.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•