[SMS/MMS] Auto suggestions returning incorrect results

VERIFIED FIXED in Firefox 24, Firefox OS v1.1hd

Status

()

Core
DOM: Device Interfaces
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: maat, Assigned: gwagner)

Tracking

unspecified
mozilla24
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +
in-moztrap +

Firefox Tracking Flags

(blocking-b2g:leo+, firefox22 wontfix, firefox23 wontfix, firefox24 fixed, b2g18 verified, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

Details

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

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Created attachment 759690 [details]
screenshot of incorrect auto-results being returned

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
(Reporter)

Updated

5 years ago
blocking-b2g: --- → leo?

Comment 1

5 years ago
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

Comment 2

5 years ago
Created attachment 759698 [details]
typping 'x' returns Aaa contact
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)

Comment 14

5 years ago
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/

Updated

5 years ago
Whiteboard: MMS_TEF → MMS_TEF, leorun3
(Assignee)

Comment 16

5 years ago
(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
(Assignee)

Updated

5 years ago
Attachment #761575 - Attachment is patch: true
Attachment #761575 - Attachment mime type: text/x-patch → text/plain
(Assignee)

Comment 18

5 years ago
Created attachment 761577 [details] [diff] [review]
patch
Attachment #761575 - Attachment is obsolete: true
Attachment #761577 - Flags: review?(bent.mozilla)
(Assignee)

Updated

5 years ago
Blocks: 877302
(Assignee)

Updated

5 years ago
Flags: needinfo?(reuben.bmo)
(Assignee)

Updated

5 years ago
Blocks: 874501
No longer blocks: 877302
Duplicate of this bug: 874501
Comment on attachment 761577 [details] [diff] [review]
patch

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

Looks good!
Attachment #761577 - Flags: review?(bent.mozilla) → review+
(Assignee)

Comment 21

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
duplicate bug 874501 is leo+, we really need leo+ here, please.
blocking-b2g: leo? → leo+
https://hg.mozilla.org/releases/mozilla-b2g18/rev/dead0d387eae
status-b2g18: --- → fixed
status-b2g18-v1.0.0: --- → wontfix
status-b2g18-v1.0.1: --- → wontfix
status-b2g-v1.1hd: --- → affected
status-firefox22: --- → wontfix
status-firefox23: --- → wontfix
status-firefox24: --- → fixed
Flags: in-testsuite+

Updated

5 years ago
Flags: in-moztrap?

Updated

5 years ago
Flags: in-moztrap? → in-moztrap+
QA Contact: croesch

Comment 26

5 years ago
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
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED

Comment 28

5 years ago
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
status-b2g18: fixed → verified

Comment 29

5 years ago
That's resolved finally? Wich is the definitive bug?
I'm testing with the build of TESTRUN4 and it doesn't work

Comment 30

5 years ago
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.

Comment 32

5 years ago
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

Comment 33

5 years ago
Created attachment 772544 [details]
MMS/SMS specs

Updated

5 years ago
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)

Comment 35

5 years ago
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!

Comment 36

5 years ago
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.