{ "id": "153424", "key": "TIMOB-20059", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "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-12-01T07:08:43.000+0000", "created": "2015-11-24T17:32:33.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "contacts", "ios" ], "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" }, { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" } ], "issuelinks": [], "assignee": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2016-01-14T22:43:32.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": "h6.Issue Description \r\nOn iOS, the callback event for both 'selectedProperty' and 'selectedPerson' of Ti.Contacts.showContacts has an empty value for the \"person\" property. When selecting a person from the contacts list, The expected behavior is to see an object attached to the person property that get the name of the contact (e.g., e.person.name). \r\n\r\nThe callback event for 'selectedProperty' returns: \r\n{code}\r\n{\"value\":\"052255\",\"property\":\"phone\",\"label\":\"home\",\"type\":\"selectedProperty\",\"source\":{},\"person\":{}} \r\n{code}\r\nh6.Steps to replicate\r\n-Create a new titanium alloy project\r\n-Open the app folder\r\n-Replace the index.xml file inside views folder and the index.js file inside controllers\r\n-Build and run\r\n-Click open\r\n-Select a contact\r\n\r\nh6.Test Case\r\nIndex.xml\r\n{code}\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\r\n{code}\r\n\r\nIndex.js\r\n{code}\r\n$.nav.open(); \r\n\r\nfunction open(){\r\n\tTi.Contacts.showContacts({\r\n\t\tselectedProperty: function(e){\r\n\t\t\talert(JSON.stringify(e));\r\n\t\t}\r\n\t});\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: 'person' property in Ti.Contacts.showContacts is empty", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS9.1\r\nXcode 7.1.1\r\nTi SDK 5.0.2GA and Ti SDK 5.1.0GA", "closedSprints": [ { "id": 529, "state": "closed", "name": "2015 Sprint 24 SDK", "startDate": "2015-11-21T01:30:12.670Z", "endDate": "2015-12-05T01:30:00.000Z", "completeDate": "2015-12-07T03:57:17.094Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "371515", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~rramirez],\r\nCan you point to the source/docs which describe the expected properties on person object?", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-26T03:55:36.000+0000", "updated": "2015-11-26T03:55:36.000+0000" }, { "id": "371536", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hi, I have changed this from bug to improvement, because the person object has been empty since iOS 8.4, when we use `selectedProperty` instead of `selectedPerson`. And in our docs we never mentioned if there's going to be information inside that object. Will investigate to see if we can populate any other information about the person in the person object. The information may only be partial as stated here: https://developer.apple.com/library/prerelease/mac/documentation/Contacts/Reference/Contacts_Framework/index.html. ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-26T08:11:19.000+0000", "updated": "2015-11-26T08:11:19.000+0000" }, { "id": "371546", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks [~cng] !\r\n\r\nPlease keep us updated. ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-26T17:54:16.000+0000", "updated": "2015-11-26T17:54:16.000+0000" }, { "id": "371581", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~rramirez]\r\n\r\nThe person object cannot be JSON stringified. But you can access it as \r\n{code}\r\ne.person.fullName\r\n{code}\r\n\r\nBut be advised that in iOS 9 the person object is a partial object by default and not all properties are available. ", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-27T08:05:05.000+0000", "updated": "2015-11-27T08:05:05.000+0000" }, { "id": "371587", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "We can consider to update the apidoc on this as a PR to explain what properties in the e.person object you can obtain.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-11-27T10:15:13.000+0000", "updated": "2015-11-27T10:15:13.000+0000" }, { "id": "371752", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/7517\r\nDocs are updated to add info about person property.", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-12-01T06:44:25.000+0000", "updated": "2015-12-01T06:44:25.000+0000" }, { "id": "371754", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Approved. PR merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-01T07:08:21.000+0000", "updated": "2015-12-01T07:08:21.000+0000" }, { "id": "371787", "author": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "body": "I tested {{e.person.fullName}} and it doesn't actually return the contact's name. It returns the string \"No name\". ", "updateAuthor": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "created": "2015-12-01T15:44:19.000+0000", "updated": "2015-12-01T15:44:19.000+0000" }, { "id": "371853", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~bachmakm], which property did you select? Is this on iOS 9.1? May I know the device model or simulator?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-02T03:12:10.000+0000", "updated": "2015-12-02T03:12:10.000+0000" }, { "id": "372072", "author": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "updateAuthor": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "created": "2015-12-03T17:25:58.000+0000", "updated": "2015-12-04T18:51:33.000+0000" }, { "id": "372073", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is also happening if you use the 4.4.0.GA ? ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-03T17:31:00.000+0000", "updated": "2015-12-03T17:31:00.000+0000" }, { "id": "372074", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "NVM I was confusing Studio with SDK.", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-03T17:31:46.000+0000", "updated": "2015-12-03T17:33:35.000+0000" }, { "id": "372127", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~ssombhatla] can you look into the latest comment? contacts is managed differently between iOS8.4 and iOS 9.1. [~bachmakm] can you describe how to reproduce your crash in more detail please?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-04T03:13:23.000+0000", "updated": "2015-12-04T03:13:23.000+0000" }, { "id": "372191", "author": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "body": "h4. Steps to Reproduce\r\n_Environment_\r\n* *Device*: iOS 5s simulator (v 9.1) or iOS 5 device (v 9.1)\r\n* *Ti SDK*: 5.1.1GA\r\n* *Ti Studio Version*: 4.4.0.201511241829-24112015183016\r\n\r\n_Replicate_\r\nIn order to reproduce, follow the steps in the original issue description, but with a couple minor changes:\r\n# In {{index.xml}} change {{}} to {{}}.\r\n# In {{index.js}} change the {{function open()}} header to {{function openThings()}}.\r\n# After starting the app and selecting a contact, select a mobile _phone number_. \r\n# Crash.\r\n\r\nNOTE: If the method header isn't changed to {{openThings()}} from {{open()}} in {{index.js}}, the contacts list view will not open. This might be due to a scope issue with a {{this.open()}} call happening in the background. \r\n", "updateAuthor": { "name": "bachmakm", "key": "bachmakm", "displayName": "Kristen Bachman", "active": true, "timeZone": "America/Havana" }, "created": "2015-12-04T19:13:21.000+0000", "updated": "2015-12-04T19:17:05.000+0000" }, { "id": "372806", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~bachmakm] The reason it crashes on iOS 9.1 is because of TIMOB-20063. Can you reverify the same on SDK 5.1.2.", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-12-14T07:49:46.000+0000", "updated": "2015-12-14T07:49:46.000+0000" }, { "id": "372910", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Tested [~bachmakm] 's steps, and was able to reproduce the issue when building with the 5.1.1GA SDK. When built with SDK: {{5.1.2.v20151208161231}} the issue was no longer reproducible. ", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2015-12-14T21:20:36.000+0000", "updated": "2015-12-14T21:20:36.000+0000" }, { "id": "374619", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verifying ticket as fixed - in regards to the issue occurring where selectedProperty causes an app crash. This issue is no longer reproducible when built with SDK 5.2.0\r\n\r\nTested on:\r\niPhone 6s Plus Device (9.2) & iPhone 6 Plus Device (8.4) \r\nMac OSX El Capitan 10.11 (15A284)\r\nTi SDK: 5.2.0.v20160114021251\r\nAppc NPM: 4.2.2 \r\nApp CLI: 5.2.0-220 \r\nXcode 7.2\r\nNode v4.2.3\r\n\r\n*Closing Ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-01-14T22:43:23.000+0000", "updated": "2016-01-14T22:43:23.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }