Closed Bug 168204 Opened 22 years ago Closed 15 years ago

Autocomplete fails if "quotes" surround Display Name in Address Book (collected addresses)

Categories

(MailNews Core :: Composition, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: greg-mozilla-bugzilla, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826

Collected addresses such as
 "Joe Bloggs" <joe@bloggs.nett>
as opposed to
 Joe Bloggs <joe@bloggs.net>
do not autocomplete if e.g.
 Joe
is typed; it is necessary to type
 "Joe
instead

Reproducible: Sometimes

Steps to Reproduce:
1. Receive a message from someone with a quoted name in their From field
2. Compose a new message
3. Type the beginning of the name after To

Actual Results:  
Did not autocomplete

Expected Results:  
Autocompleted

May be true of manually created address books too (I don't have any).
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030117

I see the problem.

My *guess* (please someone working on this component comment on this) is that
autocomplete wants to see the exact beginning of the saved string. If so, the
dependency is the one we are looking for.

pi
Severity: minor → normal
Status: UNCONFIRMED → NEW
Depends on: 182192
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
mass re-assign.
Assignee: racham → sspitzer
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030619

For me, as I type:
Joe 
the address shows as one of the alternatives, up until I type the space. But
when I type the B the address disappears.
*** Bug 227291 has been marked as a duplicate of this bug. ***
From duped Bug 227291:

=======================

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007

When typing recipient names in the To/CC/BCC/etc field, Autocomplete fails find
the address if the Display Name in the Address Book is surrounded by quotes.



TO DUPLICATE

1.   Open the Address book, click New Card
2.   In the Display field, type:  "Jane User"  [INCLUDE THE QUOTES!]
3.   In Email field, type:        juser@example.com
4.   Click OK to save, and then close the address book

5.   In MainNews, click Compose
6.   In the To: field, start typing:  Jane
     Note: Autocomplete does not list "Jane User"
7.   In the To: field, start typing:   "Jane User"  [INCLUDE THE QUOTES!]
     Note: Autocomplete lists "Jane User"


EXPECTED RESULTS:
  Autocomplete lists "Jane User" as an option, whether or not you type the quotes.


ACTUAL RESULTS:
  Autocomplete does not list "Jane User" as an option, unless you type the quotes.



CAUSE:

Many e-mail addresses come in this format (including the quotes):
   "User Name" <account@domain.com>

They are automatically added to the Address Book, depending on your settings,
but are then useless for Autocomplete.  Furthermore, I think it will confuse and
frustrate many users, who will look at their address book and say: 'He's in
there, why doesn't Autocomplete work?'.


Note: To prevent confusion:  If the e-mail address and Display Name begin with
the same letters (e.g. "Jane User" and janeuser@example.com) then the procedure
above won't duplicate the error, because Autocomplete will find the e-mail address.
Shouldn't the component be "Compostion"?  I hate to change the component on a 15
month old bug, but, Composition covers "Problems with the writing a new email or
replying to one including using the autocomplete feature. ..."

(per http://bugzilla.mozilla.org/describecomponents.cgi?product=MailNews)





Changing Summary -- bug does not require collected addresses, but manually
entered addresses too

was:  Collected addresses with quotation marks do not always autocomplete
now:  Autocomplete fails if "quotes" surround Display Name in Address Book
(collected addresses)
Wim -

"For me, as I type:
Joe 
the address shows as one of the alternatives, up until I type the space. But
when I type the B the address disappears."

That's because auto-complete is matching up the  Joe  in the e-mail address
(joe@bloggs.net) not the display name.  Once you start typing his last name, it
no longer matches the e-mail address.
Summary: Collected addresses with quotation marks do not always autocomplete → Autocomplete fails if "quotes" surround Display Name in Address Book (collected addresses)
Agree about component change, updating.
Component: Address Book → Composition
Well, the quotes aren't supposed to be in the address book - bug 168204 :-(
I don't think I got enough sleep last night ;-)
This patch skips a leading " if it is there.
the patch in bug 182192 will help with collected items, but i don't think it
will strip off quotes from existing collected items.
Assignee: sspitzer → mvl
Status: NEW → ASSIGNED
Comment on attachment 147638 [details] [diff] [review]
ignore starting quotes

Neil, if this patch is unneeded when your patch in bug 182192 is in, please
mark this one obsolete. I had written it before i noticed the dependency.
Attachment #147638 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 147638 [details] [diff] [review]
ignore starting quotes

Won't this fail if strlen(aString) == aSubstrLen but *aString == '"'?
I think you mean that the Substring(aString) might end up after the end of the
aString. But without the patch, that's also possible. callers are like:
347   if (nickName && CommonPrefix(nickName, fullString, fullStringLen))
no lenght check there either.
If that make sit acceptable, i don't know
Comment on attachment 147638 [details] [diff] [review]
ignore starting quotes

This startOffset business is far too complicated for what you need to do. Also
you haven't addressed the issue of a search string starting with a quote.
Attachment #147638 - Flags: review?(neil.parkwaycc.co.uk) → review-
Product: MailNews → Core
Assignee: mvl → sspitzer
Status: ASSIGNED → NEW
QA Contact: nbaca
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
QA Contact: composition
Product: Core → MailNews Core
does this fail in SM?
WFM in Thunderbird
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Works for me.

Build identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090929 Lightning/1.0pre SeaMonkey/2.0pre
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: