Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 86B33200B8E for ; Mon, 26 Sep 2016 11:18:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8557E160AC8; Mon, 26 Sep 2016 09:18:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB899160AB8 for ; Mon, 26 Sep 2016 11:18:21 +0200 (CEST) Received: (qmail 84263 invoked by uid 500); 26 Sep 2016 09:18:21 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 84123 invoked by uid 99); 26 Sep 2016 09:18:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2016 09:18:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B86CC2C2A5F for ; Mon, 26 Sep 2016 09:18:20 +0000 (UTC) Date: Mon, 26 Sep 2016 09:18:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-11350) Find with 'desiredFields' returns a field as null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Sep 2016 09:18:22 -0000 [ https://issues.apache.org/jira/browse/CB-11350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15522543#comment-15522543 ] ASF GitHub Bot commented on CB-11350: ------------------------------------- GitHub user matrosovN opened a pull request: https://github.com/apache/cordova-plugin-contacts/pull/135 CB-11350 android: retrieve displayName for contact when specified in desiredFields ### Platforms affected Android ### What does this PR do? DisplayName wasn't being retrieved because of wrong condition in populateContactArray. This PR allows to retrieve displayName for contact when specified in desiredFields. ### What testing has been done on this change? Auto test ### Checklist - [x] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to secretary@apache.org. - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. - [x] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/matrosovN/cordova-plugin-contacts CB-11350 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-contacts/pull/135.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 #135 ---- commit 1940b1688e217acd5b40d8afcacef7a2e326409c Author: Nikita Matrosov Date: 2016-09-26T08:42:56Z CB-11350 android: retrieve displayName for contact when specified in desiredFields displayName wasn't being retrieved because of wrong condition in populateContactArray ---- > Find with 'desiredFields' returns a field as null > ------------------------------------------------- > > Key: CB-11350 > URL: https://issues.apache.org/jira/browse/CB-11350 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Contacts > Environment: LG G4, Android 6 > Reporter: Maria Ines Parnisari > Priority: Minor > Labels: triaged > > Full repro here: https://github.com/miparnisari/ionic-demo > When you run navigator.contacts.find() with the option 'desiredFields' set including 'displayName', this particular field returns as null for all contacts. However, if you do not set this option, the field is populated properly for each contact. > Also, it is unclear to me why when you use 'desiredFields' a full-blown object is returned for each contact with almost every field set as null. Wouldn't it make more sense to just return objects with those fields? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org