Closed
Bug 900480
Opened 11 years ago
Closed 11 years ago
mozContacts.find with filter 'match' provides disparate results with different SIM cards
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
WORKSFORME
blocking-b2g | koi+ |
People
(Reporter: jmcf, Assigned: julienw)
References
Details
(Whiteboard: [u=commsapps-user c=dialer p=3 s=v1.2-features-sprint-4])
Attachments
(1 file)
336 bytes,
text/directory
|
Details |
import the attached vcard file as contacts on your device.
execute navigator.mozContacts.find({
filterBy: 'tel',
filterOp: 'match'
filterValue: ''
});
with no SIM attached on the device or with a Spanish SIM.
--> There is one result. : OK
execute the same API call with a Vivo's SIM
--> there are no results. : KO
Reporter | ||
Comment 1•11 years ago
|
||
attachment with test contacts
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to Jose M. Cantera from comment #0)
> import the attached vcard file as contacts on your device.
>
> execute navigator.mozContacts.find({
> filterBy: 'tel',
> filterOp: 'match'
> filterValue: '+3434269362248'
> });
>
> with no SIM attached on the device or with a Spanish SIM.
>
> --> There is one result. : OK
>
> execute the same API call with a Vivo's SIM
>
> --> there are no results. : KO
Updated•11 years ago
|
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Comment 3•11 years ago
|
||
(In reply to Jose M. Cantera from comment #0)
> import the attached vcard file as contacts on your device.
>
> execute navigator.mozContacts.find({
> filterBy: 'tel',
> filterOp: 'match'
> filterValue: ''
> });
>
> with no SIM attached on the device or with a Spanish SIM.
>
> --> There is one result. : OK
>
> execute the same API call with a Vivo's SIM
>
> --> there are no results. : KO
The vivo sim is from Brazil?
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Gregor Wagner [:gwagner] from comment #3)
> (In reply to Jose M. Cantera from comment #0)
> > import the attached vcard file as contacts on your device.
> >
> > execute navigator.mozContacts.find({
> > filterBy: 'tel',
> > filterOp: 'match'
> > filterValue: ''
> > });
> >
> > with no SIM attached on the device or with a Spanish SIM.
> >
> > --> There is one result. : OK
> >
> > execute the same API call with a Vivo's SIM
> >
> > --> there are no results. : KO
>
> The vivo sim is from Brazil?
Yes
Assignee | ||
Comment 6•11 years ago
|
||
Jose, can you tell us which Gecko version you're using ? Several lookup problems have been fixed recently.
Reporter | ||
Comment 7•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #6)
> Jose, can you tell us which Gecko version you're using ? Several lookup
> problems have been fixed recently.
d9a90f1
Updated•11 years ago
|
Whiteboard: [u=commsapps-user c=dialer p=0]
Comment 8•11 years ago
|
||
Reproduced with a Vivo SIM card. Same problem will happen for any SIM card with an MMC that has substring matching enabled. We save data in the ContactDB indexes that changes based on the SIM card, so to fix this we would need to go through all contacts and update their indexes when we detect a SIM card change.
Flags: needinfo?(reuben.bmo)
Updated•11 years ago
|
blocking-b2g: koi? → koi+
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Reuben Morais [:reuben] from comment #8)
> Reproduced with a Vivo SIM card. Same problem will happen for any SIM card
> with an MMC that has substring matching enabled. We save data in the
> ContactDB indexes that changes based on the SIM card, so to fix this we
> would need to go through all contacts and update their indexes when we
> detect a SIM card change.
do we really want to do this ?
The substring count is currently defined as a pref, but does it really change or can we assume that substring matching is always done with 7 characters ?
If we can assume this, then it's way easier: always store the substring match in the index, but chose if we should use this as a filter value depending on the sim card. Would that work ?
Comment 10•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #9)
> (In reply to Reuben Morais [:reuben] from comment #8)
> > Reproduced with a Vivo SIM card. Same problem will happen for any SIM card
> > with an MMC that has substring matching enabled. We save data in the
> > ContactDB indexes that changes based on the SIM card, so to fix this we
> > would need to go through all contacts and update their indexes when we
> > detect a SIM card change.
>
> do we really want to do this ?
>
> The substring count is currently defined as a pref, but does it really
> change or can we assume that substring matching is always done with 7
> characters ?
Right now we have 8 for Brazil, 10 for Colombia and 7 for Venezuela… So I'm going to say we can't :)
Assignee | ||
Comment 11•11 years ago
|
||
:(
Then maybe we can store all these possible substring match in the index, like we already do for the iterative search. It will make the index quite big but at least we will always have the same index no matter the SIM card.
Or maybe it's possible to do a range like [1] ?
[1] https://mxr.mozilla.org/mozilla-central/source/dom/contacts/fallback/ContactDB.jsm#1079
Assignee | ||
Comment 12•11 years ago
|
||
ok taking it, I hope do be able to do this during this sprint.
Assignee: nobody → felash
Whiteboard: [u=commsapps-user c=dialer p=0] → [u=commsapps-user c=dialer p=3]
Comment 13•11 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #11)
> Then maybe we can store all these possible substring match in the index,
> like we already do for the iterative search. It will make the index quite
> big but at least we will always have the same index no matter the SIM card.
You'd have to store them in several different indexes, but yes, that's a possibility if we're willing to live with the extra workload.
Updated•11 years ago
|
Whiteboard: [u=commsapps-user c=dialer p=3] → [u=commsapps-user c=dialer p=3 s=v1.2-features-sprint-3]
Assignee | ||
Updated•11 years ago
|
Whiteboard: [u=commsapps-user c=dialer p=3 s=v1.2-features-sprint-3] → [u=commsapps-user c=dialer p=3 s=v1.2-features-sprint-4]
Comment 14•11 years ago
|
||
This should be a dup of bug 877302. Can you test again?
Comment 15•11 years ago
|
||
Sorry it should be bug 905927.
Comment 16•11 years ago
|
||
Hi,
Cannot reproduce this bug with unagi master build:
ecko-fe76476
Gaia-cfcea74
Changing status to WFM
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•