Last Comment Bug 782136 - add carrier field and ContactField interface to Contacts API
: add carrier field and ContactField interface to Contacts API
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Gregor Wagner [:gwagner]
:
Mentors:
https://wiki.mozilla.org/WebAPI/Conta...
: 772095 (view as bug list)
Depends on: 784075 784099
Blocks: b2g-contact
  Show dependency treegraph
 
Reported: 2012-08-12 10:55 PDT by Andreas Gal :gal
Modified: 2012-08-20 11:16 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments
IDL (3.37 KB, patch)
2012-08-12 11:30 PDT, Gregor Wagner [:gwagner]
no flags Details | Diff | Review
Impl patch (30.43 KB, patch)
2012-08-13 13:45 PDT, Gregor Wagner [:gwagner]
fabrice: review+
Details | Diff | Review
IDL (3.37 KB, patch)
2012-08-13 13:48 PDT, Gregor Wagner [:gwagner]
gal: review+
jonas: review-
Details | Diff | Review

Description Andreas Gal :gal 2012-08-12 10:55:46 PDT
The product teams agreed that they need a carrier field for each phone number of a contact. Jonas has signed off on the change. Gregor will try to finish it by EOD August 13 along with a few other minor changes since this involves a schema change.
Comment 1 Gregor Wagner [:gwagner] 2012-08-12 11:01:18 PDT
I will also add multivalue interface ContactField in this bug.
Comment 2 Gregor Wagner [:gwagner] 2012-08-12 11:30:41 PDT
Created attachment 651211 [details] [diff] [review]
IDL
Comment 3 Mounir Lamouri (:mounir) 2012-08-13 01:35:40 PDT
(In reply to Andreas Gal :gal from comment #0)
> The product teams agreed that they need a carrier field for each phone
> number of a contact. Jonas has signed off on the change. Gregor will try to
> finish it by EOD August 13 along with a few other minor changes since this
> involves a schema change.

Where did that discussion happen? Any link?
I wonder how that would be used? Would that be pre-filled by the phone or filed by the user?
Comment 4 Daniel Coloma:dcoloma 2012-08-13 12:15:02 PDT
All the discussion was held at: https://groups.google.com/forum/?fromgroups#!topic/mozilla.dev.gaia/T-dsKQt3zYs[1-25]
Comment 5 Gregor Wagner [:gwagner] 2012-08-13 13:45:57 PDT
Created attachment 651522 [details] [diff] [review]
Impl patch
Comment 6 Gregor Wagner [:gwagner] 2012-08-13 13:48:02 PDT
Created attachment 651524 [details] [diff] [review]
IDL
Comment 7 Andreas Gal :gal 2012-08-15 11:44:24 PDT
Review ping. This is urgently needed. Other work is blocked on it.
Comment 8 [:fabrice] Fabrice Desré 2012-08-15 14:30:51 PDT
Comment on attachment 651522 [details] [diff] [review]
Impl patch

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

::: dom/contacts/fallback/ContactDB.jsm
@@ +127,5 @@
>          // Create new searchable indexes.
>          objectStore.createIndex("email", "search.email", { unique: false, multiEntry: true });
> +      } else if (currVersion == 3) {
> +        debug("upgrade 3");
> + 

nit: whitespace

@@ +216,5 @@
>  
>                // Chop off the first characters
> +              let number = aContact.properties[field][i].value;
> +              if (number) {
> +                for(let i = 0; i < number.length; i++) {

nit: for (...)
Comment 9 Andreas Gal :gal 2012-08-15 14:38:26 PDT
Comment on attachment 651524 [details] [diff] [review]
IDL

stealing, looks good to me, we can always tweak after landing
Comment 10 Jonas Sicking (:sicking) PTO Until July 5th 2012-08-15 14:43:56 PDT
Comment on attachment 651524 [details] [diff] [review]
IDL

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

r+=me if you change the type to be just a string. Otherwise I'd like to hear why we think there are more cases that will be dealing with importing/exporting vcard data than that will be displaying the type in UI. Anytime we are displaying the type in UI we need a single string. The array is only needed when importing/exporting to vcard.

r=me on adding the carrier field either way.
Comment 12 Gregor Wagner [:gwagner] 2012-08-15 17:50:31 PDT
Forgot the review comments:
https://hg.mozilla.org/integration/mozilla-inbound/rev/01a3cbde459c
Comment 13 Gregor Wagner [:gwagner] 2012-08-15 19:41:00 PDT
*** Bug 772095 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.