{ "id": "152577", "key": "TIMOB-19896", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-11-11T04:17:57.000+0000", "created": "2015-11-02T12:56:02.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "contacts", "custom", "ios", "labels", "mobile" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-11T19:54:57.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When trying to show information about contacts from the iOS Contacts app which have custom field names for phone numbers or emails or address, the Ti.Contacts.Person property 'email', 'phone' or 'adress' is undefined. Which means you can't retrieve any of the emails, phone numbers or addresses (with custom field names) associated with the contact.\r\n\r\nTo replicate, start iOS (version 9.x) simulator. Add a new contact, add one email address with one of the default \"labels\" provided by iOS, run test code (see below), the email address is listed in the console (as expected), modify the newly added person and add another email address but define a custom label to this entry, run code, the \"email\" property will be undefined. This can also be reproduced for the \"phone\" and \"address\" properties.\r\n\r\nTested with Ti SDK 5.0.2.GA\r\n\r\n{code:javascript|title=Example}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff',\r\n});\r\n\r\nvar performAddressBookFunction = function() {\r\n\tvar singleValue = ['firstName', 'lastName', 'fullName'];\r\n\tvar multiValue = ['email', 'address', 'phone'];\r\n\tvar people = Ti.Contacts.getAllPeople();\r\n\tTi.API.info('Total contacts: ' + people.length);\r\n\tfor (var i = 0,\r\n\t ilen = people.length; i < ilen; i ++) {\r\n\t\tTi.API.info('---------------------');\r\n\t\tvar person = people[i];\r\n\t\tfor (var j = 0, jlen = singleValue.length; j < jlen; j ++) {\r\n\t\t\tTi.API.info(singleValue[j] + ': ' + person[singleValue[j]]);\r\n\t\t}\r\n\t\tfor (var j = 0, jlen = multiValue.length; j < jlen; j ++) {\r\n\t\t\tTi.API.info(multiValue[j] + ': ' + JSON.stringify(person[multiValue[j]]));\r\n\t\t}\r\n\t}\r\n\r\n};\r\n\r\nvar addressBookDisallowed = function() {\r\n\talert('Hey! You disallowed this, why?');\r\n};\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle: 'Output contacts to console',\r\n\theight: 50\r\n});\r\nwin.add(button);\r\n\r\nbutton.addEventListener('click', function() {\r\n\tTi.Contacts.requestAuthorization(function(e) {\r\n\t\tif (e.success){\r\n\t\t\tperformAddressBookFunction();\r\n\t\t} else {\r\n\t\t\taddressBookDisallowed();\r\n\t\t}\r\n\t});\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "57354", "filename": "max_mustermann.vcf", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-11T03:53:44.000+0000", "size": 252, "mimeType": "text/vcard" } ], "flagged": false, "summary": "iOS: Ti.Contacts.getAllPeople() | Custom fields for phone, address and email returns undefined", "creator": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.11.1\r\n Architecture = 64bit\r\n\r\nNode.js\r\n Node.js Version = 0.12.7\r\n npm Version = 2.14.3\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.1\r\n Core Package = 5.0.4\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.5\r\n node-appc Version = 0.2.31\r\n\r\nTitanium SDKs\r\n 5.0.2.GA\r\n", "closedSprints": [ { "id": 525, "state": "closed", "name": "2015 Sprint 23 SDK", "startDate": "2015-11-07T01:30:15.519Z", "endDate": "2015-11-21T01:30:00.000Z", "completeDate": "2015-11-23T02:54:27.887Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "369389", "author": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-09T11:59:42.000+0000", "updated": "2015-11-09T13:59:07.000+0000" }, { "id": "369414", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thank you [~woodoo], we will try to reproduce it asap! ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-09T16:05:31.000+0000", "updated": "2015-11-09T16:05:31.000+0000" }, { "id": "369661", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-11T03:53:32.000+0000", "updated": "2015-11-11T03:53:32.000+0000" }, { "id": "369664", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "CR + FT passed, PR approved!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-11T04:17:57.000+0000", "updated": "2015-11-11T04:17:57.000+0000" }, { "id": "369731", "author": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "body": "I can also confirm, its fixed (tested with Ti SDK 5.1.0.v20151110202023 & Ti SDK 5.2.0.v20151111000425)! \r\n\r\nThank You all, for the rapid response, this was a key function in our app.", "updateAuthor": { "name": "woodoo", "key": "woodoo", "displayName": "Michael Woode", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-11T10:15:36.000+0000", "updated": "2015-11-11T10:15:36.000+0000" }, { "id": "369799", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Tested the above sample code with a new contact, both with custom & default field entries. As stated above, fields return as undefined when app is built with {{5.0.2.GA}} SDK and the contact contains custom field entries, works correctly when only default entries are present. using {{5.1.0.v20151110202023}} the same contact returns both default & custom field entries correctly, for phone, address, and email. Attempted to reproduce the crash with the attached contact, but was unable to do so on the tested devices.\r\n\r\nTested on iPhone 6S Plus (9.1) , iPhone 6 Plus (8.3) , iPhone 6S Simulator (9.1)\r\nMac OSX El Capitan 10.11 (15A284)\r\nTi SDK: 5.1.0.v20151110202023\r\nAppc NPM: 4.2.1\r\nAppc CLI: 5.1.0-50\r\nTi CLI: 5.0.4\r\nAlloy: 1.7.24\r\nXcode 7.1(7B91b)\r\nNode v0.12.7\r\nproduction\r\n\r\nClosing ticket.", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2015-11-11T19:54:37.000+0000", "updated": "2015-11-11T19:54:37.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }