Closed
Bug 815833
Opened 9 years ago
Closed 9 years ago
[contacts] Add PhoneNumberJS to ContactsDB
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
People
(Reporter: gwagner, Assigned: gwagner)
References
Details
Attachments
(1 file, 2 obsolete files)
16.24 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Add the international number to the search field for contacts. An API search with the international number finds now a contact that was entered with the local number. We add the international number to the search field for telephone numbers of the contact.
Assignee | ||
Comment 2•9 years ago
|
||
Andrea, can you test this? Please pull your contacts DB from the phone before you test this patch. Just in case the upgrade code is buggy and I have to rerun the upgrade code with your DB. It's in data/local/indexedDB/chrome.
Assignee | ||
Updated•9 years ago
|
blocking-basecamp: --- → ?
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #685860 -
Attachment is obsolete: true
Attachment #685867 -
Flags: review?(bent.mozilla)
Comment 4•9 years ago
|
||
[:gwagner] Only one comment in your patch. Take care because there are phone numbers that could be not internationalized! For example, in Spain we have the following number of Movistar: 2236. If you go to the library and you ask for the 'parsed' version of it, you are gonna retrieve null! So in this case instead of the following line: dump("Warning: No international number found for " + number + "\n"); You should add the request with the phone number that you receive directly, something as: contact.search[field].push(number.toString()); For create a generic way of doing it (in SMS App we kept a DB with the same problems as this one, and we fix it! ;) ), method 'parse: function(aNumber)' should return or the 'internationalNumber' (if it's available), or 'aNumber' directly, in order to work properly with phone numbers with a length less than 8 characters (http://en.wikipedia.org/wiki/E.164). Thanks!!!
Updated•9 years ago
|
blocking-basecamp: ? → +
Comment on attachment 685867 [details] [diff] [review] patch Review of attachment 685867 [details] [diff] [review]: ----------------------------------------------------------------- r=me with one comment: ::: dom/contacts/fallback/ContactDB.jsm @@ +171,5 @@ > + debug("InternationalFormat: " + parsedNumber.internationalFormat); > + debug("InternationalNumber: " + parsedNumber.internationalNumber); > + debug("NationalNumber: " + parsedNumber.nationalNumber); > + debug("NationalFormat: " + parsedNumber.nationalFormat); > + cursor.value.search.tel.push(parsedNumber.internationalNumber); This could be avoided if parsed number == existing number.
Attachment #685867 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 6•9 years ago
|
||
upgrade code....
Attachment #685867 -
Attachment is obsolete: true
Attachment #686798 -
Flags: review?(bent.mozilla)
Attachment #686798 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/71ffd1a30c08
Assignee | ||
Comment 8•9 years ago
|
||
Followup: https://hg.mozilla.org/integration/mozilla-inbound/rev/9f1365db9a35
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/71ffd1a30c08 https://hg.mozilla.org/mozilla-central/rev/9f1365db9a35
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 10•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/927dd0a37a65 https://hg.mozilla.org/releases/mozilla-aurora/rev/26070fd9985b https://hg.mozilla.org/releases/mozilla-beta/rev/46925afbd175 https://hg.mozilla.org/releases/mozilla-beta/rev/13bb74c3367e
Comment 11•9 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=813621#c11
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•9 years ago
|
||
Copy & Paste the scenario: - Store one Contact with 612123123 - Request to Contact API with the internationalized one: var options = { filterBy: ['tel'], filterOp: 'equals', filterValue: '+34612123123' }; - Call to API: window.navigator.mozContacts.find(options); EXPECTED: Retrieve the contact CURRENTLY: No contact retrieved for the internationalized version of the phone number
Updated•9 years ago
|
Flags: needinfo?(anygregor)
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to Borja Salguero [:borjasalguero] from comment #13) > Copy & Paste the scenario: > > - Store one Contact with 612123123 > - Request to Contact API with the internationalized one: > var options = { > filterBy: ['tel'], > filterOp: 'equals', Equals currently only checks the number you entered. 'contains' should work.
Flags: needinfo?(anygregor)
Comment 15•9 years ago
|
||
Thanks! Closing again ;)
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
status-b2g18:
--- → fixed
Updated•8 years ago
|
Blocks: b2g-phonenumberjs
You need to log in
before you can comment on or make changes to this bug.
Description
•