Closed Bug 782136 Opened 12 years ago Closed 12 years ago

add carrier field and ContactField interface to Contacts API

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17
blocking-basecamp +

People

(Reporter: gal, Assigned: gwagner)

References

()

Details

Attachments

(2 files, 1 obsolete file)

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.
Assignee: nobody → anygregor
blocking-basecamp: --- → ?
I will also add multivalue interface ContactField in this bug.
Summary: add carrier field to Contacts API → add carrier field and ContactField interface to Contacts API
Blocks: b2g-contact
Attached patch IDL (obsolete) — Splinter Review
Whiteboard: [blocked-on-input Chris Lee]
(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?
OS: Mac OS X → All
Hardware: x86 → All
Attached patch Impl patchSplinter Review
Attached patch IDLSplinter Review
Attachment #651211 - Attachment is obsolete: true
Attachment #651524 - Flags: review?(jonas)
Attachment #651522 - Flags: review?(fabrice)
Review ping. This is urgently needed. Other work is blocked on it.
blocking-basecamp: ? → +
Whiteboard: [blocked-on-input Chris Lee]
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 (...)
Attachment #651522 - Flags: review?(fabrice) → review+
Comment on attachment 651524 [details] [diff] [review]
IDL

stealing, looks good to me, we can always tweak after landing
Attachment #651524 - Flags: review?(jonas) → review+
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.
Attachment #651524 - Flags: review-
Depends on: 784075
Depends on: 784099
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: