{ "id": "152108", "key": "TIMOB-19739", "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" }, { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-10-21T17:38:57.000+0000", "created": "2015-10-16T06:51:02.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "contacts", "ios", "iphone" ], "versions": [], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-09T12:20:30.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": "i need urgent solution for this bug in Contacts list phone numbers , IOS\r\n\r\nif i have contact he's phone number saved in custom label the phone numbers of this contact object return \"undefined\" \r\n\r\n\r\n\r\n{code:java}\r\n var people = Ti.Contacts.getAllPeople(); \r\n\r\n for ( var i = 0 ; i < people.length; i++)\r\n {\r\n \tvar person = people[i];\r\n \tvar contactPhones = person['phone'] ;//should be array \r\n \t//if contact has phone number saved as custom label return undefined;\r\n \tTi.API.info(i+' - Contact Phones '+contactPhones);\r\n }\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.Contacts custom phone label in phones become undefined", "creator": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "MacBook Pro (Retina, 13-inch, Late 2013) , OS X Yosemite", "closedSprints": [ { "id": 503, "state": "closed", "name": "2015 Sprint 21 SDK", "startDate": "2015-10-10T00:32:18.011Z", "endDate": "2015-10-24T00:32:00.000Z", "completeDate": "2015-10-26T02:20:47.579Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "367119", "author": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "body": "anyone ?", "updateAuthor": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-19T06:56:27.000+0000", "updated": "2015-10-19T06:56:27.000+0000" }, { "id": "367141", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~jackSparrow] we have been able to reproduce the issue and will schedule it asap.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-10-19T14:54:07.000+0000", "updated": "2015-10-19T14:54:07.000+0000" }, { "id": "367268", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here : https://github.com/appcelerator/titanium_mobile/pull/7322", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-20T07:20:47.000+0000", "updated": "2015-10-20T07:20:47.000+0000" }, { "id": "367310", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Tested the above demo code using the PR of [~cng]. Works fine, FT approved, PR merged, ticket resolved. Thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-10-20T16:59:31.000+0000", "updated": "2015-10-20T16:59:31.000+0000" }, { "id": "367375", "author": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "body": "yes the above demo by Chee is working fine on custom labels , but it cost another issue , when add new contact has default label it gives Error exception , for example add new contact but don't change the label keep it \"phone\" :\r\n\r\n{code:java}\r\nif (key == nil )\r\n {\r\n \r\n @try {\r\n key = [NSString stringWithString:genericProperty.label];\r\n }\r\n @catch (NSException *exception) {\r\n \r\n key = nil;\r\n DebugLog(@\"%@\", exception.reason);\r\n }\r\n\t}\r\n\r\n //with or without key == nil , cost new contact issue \r\n if (key == nil) {\r\n \t\tDebugLog(@\"Unable to find key for property\");\r\n \t\treturn nil;\r\n }\r\n{code}\r\n\r\n\r\nConsole print out exception Error for new contact : \r\n\r\n\r\n{code:java}\r\n*** -[NSPlaceholderString initWithString:]: nil argument\r\n{code}\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-21T06:38:13.000+0000", "updated": "2015-10-21T06:38:13.000+0000" }, { "id": "367376", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~jackSparrow], sorry, I might be missing something here, i had no problem adding a new contact with default settings. can you write an example code (in JS) that explains the new problem?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-21T06:53:42.000+0000", "updated": "2015-10-21T06:53:42.000+0000" }, { "id": "367377", "author": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry my bad in explain , here what i did : \r\n\r\n1- open phone dialog , write any phone number .\r\n2- click on + icon to create new contact ( the number your wrote in dialog ) .\r\n3- by default the label will be \"phone\" keep it and click save .\r\n\r\nnow get contacts list using above code with bug fix , you will get Error exception :\r\n\r\n\r\n{code:java}\r\n*** -[NSPlaceholderString initWithString:]: nil argument\r\n{code}\r\n\r\ni did not tested it on simulator , tested on my iPhone. \r\n\r\n", "updateAuthor": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-21T07:00:39.000+0000", "updated": "2015-10-21T07:00:39.000+0000" }, { "id": "367393", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "good catch [~jackSparrow], this should be an apple bug since it's that value should be nonnull as according to the docs here:\r\nhttps://developer.apple.com/library/ios/documentation/Contacts/Reference/CNLabeledValue_Class/#//apple_ref/occ/instp/CNLabeledValue/label\r\n\r\nBut PR here anyway, until Apple fixes it.\r\nhttps://github.com/appcelerator/titanium_mobile/pull/7325", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-21T08:46:13.000+0000", "updated": "2015-10-21T08:46:13.000+0000" }, { "id": "367394", "author": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Chee Kiat Ng , you are the man (y)", "updateAuthor": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-21T08:52:41.000+0000", "updated": "2015-10-21T08:52:41.000+0000" }, { "id": "367432", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR tested and approved. [~jackSparrow], we will also supply this fix in the upcoming 5.1.0 version instead of 5.2.0. Thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-10-21T17:38:29.000+0000", "updated": "2015-10-21T17:38:29.000+0000" }, { "id": "367554", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, tested on 9.1 iPhone 6S Plus device, using 5.0.2.GA release, I am able to reproduce the error. Creating a contact with custom label \"phone\" and running the app will log the contact as \"undefined\". rebuilding app with release 5.1.0.v20151021165224, the error is no longer reproducible. \r\n\r\nMac OSX El Capitan 10.11 (15A284)\r\nStudio: 4.3.3.201510201834\r\nTi SDK: 5.1.0.v20151021165224\r\nAppc NPM: 4.2.1-6\r\nAppc CLI: 5.2.0-24\r\nTi CLI: 5.0.4\r\nXcode 7.1(7B91b)\r\nNode v0.12.7\r\nproduction\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2015-10-22T17:56:44.000+0000", "updated": "2015-10-22T17:56:44.000+0000" }, { "id": "369390", "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-09T12:20:30.000+0000", "updated": "2015-11-09T12:20:30.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }