You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vishal Mishra (JIRA)" <ji...@apache.org> on 2017/11/27 21:03:00 UTC

[jira] [Closed] (CB-10976) Can't remove phonenumber field from contact

     [ https://issues.apache.org/jira/browse/CB-10976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vishal Mishra closed CB-10976.
------------------------------
    Resolution: Won't Fix

This plugin is being deprecated. No more work will be done on this plugin by the Cordova development community. You can continue to use this plugin and it should work as-is in the future but any more arising issues will not be fixed by the Cordova community.

> Can't remove phonenumber field from contact
> -------------------------------------------
>
>                 Key: CB-10976
>                 URL: https://issues.apache.org/jira/browse/CB-10976
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-contacts (DEPRECATED)
>    Affects Versions: 2.0.0
>         Environment: iOS 9.3
>            Reporter: Tobias Mücksch
>              Labels: iOS, triaged
>
> Short demo script:
> {code:javascript}
>     navigator.contacts.find(["*"], function (contacts) {
>         // Pick a contact
>         // (Make sure the contact has more than two phoneNumberFields)
>         var myContact = contacts[4]; 
>         // Remove the second phone number
>         delete myContact.phoneNumbers[1];
>         myContact.save(function () {
>             console.log("Success");
>             /// You will see, that the contact still has all it's previous phone numbers
>         }, function () {
>             console.error("error while saving");
>         });
>         
>     }, function () {
>         console.error("Could not access conacts.");
>     });
> {code}
> Let's say a existing contact that I've retrieved from the system has two or more phone number fields. When I remove one of the both contact fields from the phoneNumbers array and then save the contact, *it still has all numbers on the device*. When I re-retrieve the contact it has both numbers again. (Tested on iOS 9.3 with plugin version 2.0.1)
> *I can't find any hint in the documentation if I do something wrong or if the plugin is behaving wrong.*
> I have created a demo script, which reproduces the issue. You can use it for testing:
> http://pastebin.com/XRdREL3Y
> You might want to remove line 25 which removes the contact in the end.
> This SO Question might be related to the issue: http://stackoverflow.com/questions/35698798/cordova-contacts-plugin-contact-data-is-duplicating-instead-of-overwriting-conta?rq=1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org