Closed Bug 860804 Opened 7 years ago Closed Last year
[sms] Can't search for a middle name
STR: * have a contact like "Juan Carlos Alfonso Víctor María de Borbón y Borbón-Dos Sicilias" (more than 2 words in the given name, more than 2 words in the last name) * search for eg "carlos" Expected: * we should find the contact Actual: * we find nothing This may be a Contacts API bug: * either we should be able to search _inside_ a property * or a 2-word givenName should be stored as an array (or something like this), and the index should cover this.
I added this contact in the contact App Then, I tried to find this contact in the contact App and it works. But in the sms app, I can't find this contact, even if I find the first name. Is it maybe because I use desktop client instead of a real phone ? If I can resolve this problem I would be happy to work on this bug :)
(In reply to AxelR from comment #1) > If I can resolve this problem I would be happy to work on this bug :) The contacts matching code is different between the SMS and Contacts app, see: https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/contacts.js ... and: https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contacts/js/contacts_matcher.js Though the latter doesn't seem to care for the middle name either. You might want to try injecting the contacts' matching code into the SMS app and see what gives :)
Component: Gaia::SMS → DOM: Contacts
Product: Firefox OS → Core
AxelR, if you're still interested in fixing the bug, you'll have to look at ContactDB, specifically the makeImport method: http://dxr.mozilla.org/mozilla-central/source/dom/contacts/fallback/ContactDB.jsm#832 It's not the prettiest code, but the fix should be simple, we need to split givenName/familyName/name properties and add the individual words to the index.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
DOM: Contacts isn't used anymore. Closing all remaining bugs.
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.