Closed Bug 994567 Opened 6 years ago Closed 3 years ago

[Messages] The contact name is not looked up for "exact" matches in the recipient panel

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sync-1, Assigned: anubhav.worklinux, Mentored)

References

Details

(Whiteboard: [sms-papercuts][lang=js])

Attachments

(2 files)

Firefox OS v1.3
 Mozilla build ID:20140323004002
 
 DEFECT DESCRIPTION:
 Do not display contacts's name when input all number in the recipients
  REPRODUCING PROCEDURES:
 Pre:have a  contact(eg:mr 10010) in the contacts
 1.edit Message
 2.input 10010 in the recipients
 3.click the text contents
 4.recipients display 10010--K.O
 
  EXPECTED BEHAVIOUR:
 K.O--Should display mr in the recipients
 
  ASSOCIATE SPECIFICATION:
 
  TEST PLAN REFERENCE:
 
  TOOLS AND PLATFORMS USED:
 
  USER IMPACT:Medium
 
  REPRODUCING RATE:5/5
 
  For FT PR, Please list reference mobile's behavior:
 v1.1 can reproduce this bug too.
Attached file jrdlog
Mmm you're right, maybe we should do a contact exact search at blur (the same search we do when the user presses ';').

Omega, what do you think?
Flags: needinfo?(ofeng)
Not sure what's blur, but yeah, when inputting numbers, it should also search contact names.
Flags: needinfo?(ofeng)
Sorry Omega, I probably should have put some more context, I was in a hurry yesterday evening.

First, "blur" is when you had the focus there but you put the focus somewhere else. The action of losing the focus is called "blurring", and technically we have an event to react at this.

Here is how the recipient panel behaves right now:

* when you enter numbers or characters, we "search as you type" and display a suggestion list
* if you press "enter", we add as recipient the first item in the suggestion list
* if you press ";" or ",", we look for an exact match (for example if you wrote "Omeg" it won't add "Omega Feng", but if you wrote "Omega Feng" exactly it will)
* and, I just checked, if you blur, we do the same than ";", we look for an exact match

But I just checked too, it seems we don't search for an exact match for phone numbers... And I guess it's because it's hard because of how phone matching works.

All this was implemented as part of bug 920546.
See [1]: the fact that we don't lookup digit recipients when doing an exact search was done on purpose. I'll look back to the history of the bug to see if there was any reason.

[1] https://github.com/mozilla-b2g/gaia/blob/d0df27f36ca86bc33f92d38f7e59eb05fc5e79d2/apps/sms/js/recipients.js#L43-L47
Flags: needinfo?(felash)
See Also: → 1019479
I think we didn't do this on purpose.

It just happens that:

* recipients entered as phone number are not "questionable" (means: it's not a potential error)
* we check only questionable recipients for a match

I think we should change how we match for exact matches; we should try to match phone numbers too.

Tentatively adding as a mentored bug; I think it's possible to fix in Firefox using the mozContacts mock we have.
Mentor: felash
Flags: needinfo?(felash)
Whiteboard: [sms-papercuts][lang=js]
> I think we didn't do this on purpose.

I meant: we did this not on purpose.
Summary: [Sora][Message][Contacts]Do not display contacts's name → [Messages] The contact name is not looked up for "exact" matches in the recipient panel
hey! i would like to work on this bug.
yes sure !

Do you need some more instructions, or is it clear enough ?
Assignee: nobody → anubhav.worklinux
Thanks! I ll start with the bug and if i'm stuck somewhere i'll ask you on IRC!!
Duplicate of this bug: 1192877
Flags: needinfo?(felash)
answered https://github.com/mozilla-b2g/gaia/pull/31375/files#r37656201 on github; sorry for the delay, as I had to do some research because this is not that _easy_ :)
Flags: needinfo?(felash)
Status: NEW → ASSIGNED
Hey Anubhav,
Any update on this?
Flags: needinfo?(anubhav.worklinux)
Hi rishav!
sorry for being unavailable all this time, but im back to it now. i ll take a look at the last commit i did for this bug and continue ahead.
Thanks
Flags: needinfo?(anubhav.worklinux)
Awesome, Great to see, you are still with us.
Hey Anubhav,
How it's going? Comment or come over irc if you stuck somewhere :)

Thanks
Flags: needinfo?(anubhav.worklinux)
hi rishav!
i'm extremely sorry for the delay!

i am going to contact either julian or you on the irc today or tommorow.
This issue has some underlying problems that need to be discussed before any code changes.
Flags: needinfo?(anubhav.worklinux)
Mass closing of Gaia::SMS bugs. End of an era :(
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.