You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by manugb <gi...@git.apache.org> on 2015/07/23 06:12:51 UTC

[GitHub] cordova-plugin-contacts pull request: Return rawId

GitHub user manugb opened a pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/68

    Return rawId

    contactAccessor.getContactById() actually expects the contact rawId

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/manugb/cordova-plugin-contacts fix-modify-contact-return

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-contacts/pull/68.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #68
    
----
commit 5f2aa434e7894be0c1cd4f266cb28151da906a9b
Author: manugb <ma...@gmail.com>
Date:   2015-07-23T04:02:02Z

    Return rawId

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Return rawId

Posted by manugb <gi...@git.apache.org>.
Github user manugb closed the pull request at:

    https://github.com/apache/cordova-plugin-contacts/pull/68


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Return rawId

Posted by manugb <gi...@git.apache.org>.
Github user manugb commented on the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/68#issuecomment-125333085
  
    Had anyone take a look at this ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Return rawId

Posted by vladimir-kotikov <gi...@git.apache.org>.
Github user vladimir-kotikov commented on the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/68#issuecomment-160987859
  
    @manugb, this was fixed in #87, please close this PR


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Return rawId

Posted by manugb <gi...@git.apache.org>.
Github user manugb commented on the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/68#issuecomment-149230516
  
    Hi @purplecabbage 
    Im sorry but I dont have time right now to write a test suite. Anyway here is the description
    
    It was happening to me that when I was updating a contact, the contact was getting updated successfully BUT I got the error callback executed. 
    This seemed wierd to me so I dig in the [modifyContact](https://github.com/apache/cordova-plugin-contacts/blob/master/src/android/ContactAccessorSdk5.java#L1015) method and find out that was returning the contactID but the [getContactByID](https://github.com/apache/cordova-plugin-contacts/blob/master/src/android/ContactAccessorSdk5.java#L302) methods used [here](https://github.com/apache/cordova-plugin-contacts/blob/master/src/android/ContactManager.java#L106) is expecting the RAW contactId, therefore I make the change and then I could successfully update the contact and get the success callback executed
    
    The test should be something like:
    * get an existing contact
    * modify it and save it
    * check that the error callback was called
    * check that the contact was modified correctly despite error callack being called
    
    update modifyContact to return RawID
    * same as before but check success cb is executed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-plugin-contacts pull request: Return rawId

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/68#issuecomment-144136865
  
    Hey @manugb 
    Sorry for the delay in looking at this. Can you point to where it says rawId should be returned, or explain why?  Looking at the code, it is very hard to tell, but it seems create is returning an id, and not a rawId, and save is calling either create||modify so it seems they should both return the same type of id.
    
    Also, it would be great if we could have a test added that proves this error exists, and also that this pr fixes it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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