Closed Bug 880644 Opened 11 years ago Closed 11 years ago

[SMS/MMS] Auto suggestions returning incorrect results

Categories

(Core :: DOM: Device Interfaces, defect)

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla24
blocking-b2g leo+
Tracking Status
firefox22 --- wontfix
firefox23 --- wontfix
firefox24 --- fixed
b2g18 --- verified
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed

People

(Reporter: maat, Assigned: gwagner)

References

()

Details

(Whiteboard: MMS_TEF, leorun3, [fixed-in-birch], leorun4)

Attachments

(4 files, 1 obsolete file)

Auto suggestions returning incorrect results. It would seem that the auto suggestions are referencing the contacts 'type' field.

***PATH***
1) ensure that there are contacts in the contact list that whose first name, last name and company and carrier do not have an 'M' in their strings. Also ensure that they have a phone number with type ' mobile' associated to them.
2) open the messages app
3) select new message
4) type M in the 'to' field 

***EXPECTED***
No results will be returned in the auto suggestions

***ACTUAL***
contacts that have phone type 'mobile'  are returned.

Refer to attached screenshot
blocking-b2g: --- → leo?
Just to add that this is happening with latest build:
Gecko-7af1737
Gaia-b5937ae

It was reported before, bug 876861 but was set as duplicated of another bug, bug 874501 which is supposed to be fixed, but it seems that something is still wrong.
Whiteboard: MMS_TEF
I believe this is a duplicate of bug 874456, which was closed as a duplicate of bug 874501 (indirectly a duplicate)
(In reply to Rick Waldron from comment #3)
> I believe this is a duplicate of bug 874456, which was closed as a duplicate
> of bug 874501 (indirectly a duplicate)

Sure, that is what Isabel has pointed out in comment 1, but the problem is that we are still reproducing the bug so the landed patch for bug 874501 is not working.
Assignee: nobody → francisco.jordano
Requiring qawanted sice I'm not able to reproduce with v1-train builds.

Thanks!
Keywords: qawanted
This sure looks a lot like Bug 874501. At least, the 2 reported cases "work" like bug 874501. I'm quite sure this has nothing to do with the "type" field.

But for sure I reproduce this too.
Removing qawanted because I reproduce.

STR:
* have a contact with a number containing a 5, but with no "j" in its name
* from the SMS app, try to add a recipient by starting with "j"

=> the contact will be displayed in the suggestions list, whereas it should not.
Keywords: qawanted
I can reproduce it with the following set of contacts

Name: Daniel
Surname: Coloma
Phone: 555555555

Name: Maria
Surname: Oteo
Phone: 777777777

If I introduce 's' in the search suggestions I get suggestions :(
Looks to me as a backend issue.

When changing to m-c same v1-train gaia branch doesn't show this behaviour.

As a clue, I started seeing this messages on the version that seems that is working:

E/GeckoConsole(  547): Content JS WARN at resource://gre/modules/ContactDB.jsm:884 in _findWithIndex: ContactDB: 'contains' only works for 'tel'. Falling back to 'startsWith'.
E/GeckoConsole(  547): Content JS WARN at resource://gre/modules/ContactDB.jsm:884 in _findWithIndex: ContactDB: 'contains' only works for 'tel'. Falling back to 'startsWith'.

Bringing Gregor and Reuben into the conversation.
(In reply to Julien Wajsberg [:julienw] from comment #6)
> I'm quite sure this has nothing to do with the "type" field.

Confirmed. At no point does the contact search use the "type" field 

> 
> But for sure I reproduce this too.

Same here:

- gaia/master
- b2g18 (build around 12am)
(In reply to Francisco Jordano [:arcturus] from comment #9)
> Looks to me as a backend issue.
> 
> When changing to m-c same v1-train gaia branch doesn't show this behaviour.
> 
> As a clue, I started seeing this messages on the version that seems that is
> working:
> 
> E/GeckoConsole(  547): Content JS WARN at
> resource://gre/modules/ContactDB.jsm:884 in _findWithIndex: ContactDB:
> 'contains' only works for 'tel'. Falling back to 'startsWith'.
> E/GeckoConsole(  547): Content JS WARN at
> resource://gre/modules/ContactDB.jsm:884 in _findWithIndex: ContactDB:
> 'contains' only works for 'tel'. Falling back to 'startsWith'.

This is completely ok and works exactly as Julien and I expected it always would—the filterOp "contains" behaviour was actually "startsWith", and we designed the search around that expectation.
(In reply to Rick Waldron from comment #11)
> (In reply to Francisco Jordano [:arcturus] from comment #9)
> > Looks to me as a backend issue.
> > 
> > When changing to m-c same v1-train gaia branch doesn't show this behaviour.
> > 
> > As a clue, I started seeing this messages on the version that seems that is
> > working:
> > 
> > E/GeckoConsole(  547): Content JS WARN at
> > resource://gre/modules/ContactDB.jsm:884 in _findWithIndex: ContactDB:
> > 'contains' only works for 'tel'. Falling back to 'startsWith'.
> > E/GeckoConsole(  547): Content JS WARN at
> > resource://gre/modules/ContactDB.jsm:884 in _findWithIndex: ContactDB:
> > 'contains' only works for 'tel'. Falling back to 'startsWith'.
> 
> This is completely ok and works exactly as Julien and I expected it always
> would—the filterOp "contains" behaviour was actually "startsWith", and we
> designed the search around that expectation.

Sure, and I think that's the correct behavior, but as a result of the filter, the contacts api is sending us results that we should'nt display.

Thanks a lot for taking a look to this! \o/
Gregor, Reuben, could you please have a look to this issue ? It looks like we miss a patch on b2g18, and we'd appreciate your help on this.

Thanks :)
Flags: needinfo?(reuben.bmo)
Flags: needinfo?(anygregor)
This issue reproduces on Leo 1.1 (Test Run Firefox OS 1.1.0 Full – Leo)
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/8e3f39363c54
Gaia: ea18de80fd04110756becaed214656642388401d
Platform Version: 18.0

PREREQUISITES:
*Having several contacts registered, imported from Facebook, Gmail, Hotmail and manually entered.
*Having several contacts with no "x" char in "Name", "Last name", "Company", or "Carrier" fields.

STEPS:
1.Open SMS app
 Tap on new icon to create a new SMS
 On 'To' field start typing some characters
2.Open SMS app
  Tap on new icon to create a new SMS
  On 'To' field type "x" char

ACTUAL:
1:
* If the string typed in the "To:" field matches with the initially chars of "Name" or "Last name", it works well. The suggestions list is correct and the matching chars highlighted. If matches with "Company" or "Carrier" fields, the contact is not shown in the list.
* If the string typed in the "To:" field matches with any chars of "Name","Last name","Company", or "Carrier", it doesn't work. The suggestions list is randomly incorrect.
2:
The suggestions list shows contacts that don't match anywhere.

EXPECTED:
1.The suggestions list shows the contacts that the string typed in the "To:" field, matches with any chars (anywhere)of "Name", "Last name", "Company", or "Carrier" fields. And the matching chars are highlighted. 
2.No matching results are displayed

Link to failed test case: 
https://moztrap.mozilla.org/manage/case/7872/
Whiteboard: MMS_TEF → MMS_TEF, leorun3
(In reply to Julien Wajsberg [:julienw] from comment #13)
> Gregor, Reuben, could you please have a look to this issue ? It looks like
> we miss a patch on b2g18, and we'd appreciate your help on this.
> 
> Thanks :)

Yeah the patch in bug 874501 doesn't work. I will fix it.
Assignee: francisco.jordano → anygregor
Flags: needinfo?(anygregor)
Component: Gaia::SMS → DOM: Device Interfaces
Product: Boot2Gecko → Core
Attached patch patch (obsolete) — Splinter Review
Attachment #761575 - Attachment is patch: true
Attachment #761575 - Attachment mime type: text/x-patch → text/plain
Attached patch patchSplinter Review
Attachment #761575 - Attachment is obsolete: true
Attachment #761577 - Flags: review?(bent.mozilla)
Blocks: 877302
Flags: needinfo?(reuben.bmo)
Blocks: 874501
No longer blocks: 877302
Comment on attachment 761577 [details] [diff] [review]
patch

Review of attachment 761577 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!
Attachment #761577 - Flags: review?(bent.mozilla) → review+
https://hg.mozilla.org/projects/birch/rev/b5d440b71e59
Whiteboard: MMS_TEF, leorun3 → MMS_TEF, leorun3, [fixed-in-birch]
https://hg.mozilla.org/mozilla-central/rev/b5d440b71e59
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
duplicate bug 874501 is leo+, we really need leo+ here, please.
blocking-b2g: leo? → leo+
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
QA Contact: croesch
Tested on Unagi- Buid: manifest.V1-train.Rel0.4.Sprint10.B-245.Gecko-c6e29ce.Gaia-3e90908

PREREQUISITES:
*Having several contacts registered, imported from Facebook, Gmail, Hotmail and manually entered.
*Having several contacts with no "x" char in "Name", "Last name", "Company", or "Carrier" fields.

STEPS:
1.Open SMS app
 Tap on new icon to create a new SMS
 On 'To' field start typing some characters
2.Open SMS app
  Tap on new icon to create a new SMS
  On 'To' field type "x" char

ACTUAL:
1:
The suggestions list is empty
2:
The suggestions list is empty


EXPECTED:
1.The suggestions list shows the contacts that the string typed in the "To:" field, matches with any chars (anywhere)of "Name", "Last name", "Company", or "Carrier" fields. And the matching chars are highlighted. 
2.No matching results are displayed
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
bov, can we please file a new bug ? This is maybe a Gaia bug this time, I'd like to investigate, and it's better done in another bug. Thanks !
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
This issue does not repro as per the STR found on description, Comment 7, comment 8 and comment 14.

No results are found in the auto suggestions when a character(M/x/s/j as per the STR's) that is not found in the contact is introduced.  

Verified on
Leo Build ID: 
Build ID: 20130625070217
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/29933d1937db
Gaia: 1436e2778b90bd74635b0b94d1cf8ccb0d71b60c
Platform Version: 18.1
RIL Version: 01.01.00.019.138
Status: RESOLVED → VERIFIED
That's resolved finally? Wich is the definitive bug?
I'm testing with the build of TESTRUN4 and it doesn't work
This issue tested on Leo 1.1 (Test Run Firefox OS 1.1.0 Full – Leo Run 4)
Gecko a378807ff04076c20f08b0102286b9eb2d08d60a
Gaia 1436e2778b90bd74635b0b94d1cf8ccb0d71b60c
Platform Version: 18.1

PREREQUISITES:
*Having several contacts registered, 
*Having several contacts with no "x" char in "Name", "Last name" and "Company" 

STEPS:
1.Open SMS app
 Tap on new icon to create a new SMS
 On 'To' field start typing some characters
2.Open SMS app
  Tap on new icon to create a new SMS
  On 'To' field type "x" char

ACTUAL:
1: It works well except if the string matches with the beginning of the Company  field. In that case, the contact doesn't appear in the suggestions list
2: It works well. The suggestions list shows empty.

EXPECTED:
Answer from Ayman Mann asking him about the correct behaviour of the SMS Autosuggestions (2013-06-28):
"At the moment we should be searching:
•	First name
•	Last name
•	Company 
•	Phone number

We should be searching each string from the beginning, not from any part of the string."

Note, that the Test Cases related shoud be changed cause they consider the match is with any part of the string.

Link to failed test case: 
https://moztrap.mozilla.org/manage/case/7871/
https://moztrap.mozilla.org/manage/case/7883/
https://moztrap.mozilla.org/manage/case/7889/
https://moztrap.mozilla.org/manage/case/7884/
https://moztrap.mozilla.org/manage/case/7890/
https://moztrap.mozilla.org/manage/case/7874/
https://moztrap.mozilla.org/manage/case/7878/
https://moztrap.mozilla.org/manage/case/7879/
https://moztrap.mozilla.org/manage/case/7880/
Whiteboard: MMS_TEF, leorun3, [fixed-in-birch] → MMS_TEF, leorun3, [fixed-in-birch], leorun4
Ok, we don't search the company at all so that's consistent ;)

Filed bug 890706 about this.
As Ayman has mentioned in this bug description, and in the email sent to me (see Comment 30), the SMS Autosuggestions should be searching also in the Company field, as well as in Name, Last Name and Phone number.
Really in page 7 of the MMS/SMS specs (see atachment to confirm that's the correct and latest one)it points out that " Auto suggest is triggered and populated by a correlation between the input string and any part of the first name or last name fields contained in the contact list "

Now, it seems to be cleared, that only search in the beginning of the field's strings, and if Ayman confirms that only should serach in Name, Last Name and Phone, I won't reopen the bugs, and change the corresponding test cases in Moztrap in order not to failed these TC's any more.

But please, update the MMS/SMS specs and notify about it
Attached file MMS/SMS specs
Flags: needinfo?(aymanmaat)
bov, I filed bug 890706 for this specific issue. Moreover, if we want to do this, it will be in the Sms app and not in the Gecko code, therefore it really belongs to a different bug.
Flags: needinfo?(aymanmaat)
I agree with you, Julien. That was the original bug's product/component, and probably I forgot to change it.
If necessary we follow bug 890706.
Thanks!
Working as expected in today's nightly:

Gecko  http://hg.mozilla.org/releases/mozilla-b2g18/rev/282b5c37cf8d
Gaia   e2ef782119b7e79fc62c48d36f0c36909d982988
BuildID 20130712070210
Version 18.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: