{ "id": "160525", "key": "TIMOB-23440", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-06-27T00:48:05.000+0000", "created": "2016-05-26T02:45:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.3.0" ], "versions": [ { "id": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "issuelinks": [ { "id": "51842", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "151042", "key": "TIMOB-19479", "fields": { "summary": "Parity for Android and iOS on handling of permissions", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-09-05T14:50:15.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nCurrently, Windows uses {{Ti.Contacts.requestAuthorization()}} to request authorization, this should be changed to match iOS and Android which use {{Ti.Contacts.requestContactsPermissions()}} this was implemented in TIMOB-19479\r\n\r\n{code}\r\nTi.Contacts.requestContactsPermissions(function(e) {\r\n if (e.success === true) {\r\n alert(\"Access granted\");\r\n } else {\r\n alert(\"Access denied, error: \" + e.error);\r\n }\r\n});\r\n{code}\r\n\r\niOS and Android also use {{Ti.Contacts.hasContactsPermissions()}} to detect whether permissions are accepted for the app or not.\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Using the code above build to a Windows device or emulator\r\n\r\nh5.Actual result\r\n\r\nThe application will throw the error\r\n\r\n{code}\r\n[ERROR] : Application Error: {\r\n[ERROR] : \"line\": 2,\r\n[ERROR] : \"column\": 10,\r\n[ERROR] : \"message\": \"Error while require(/app) Ti.Contacts.requestContactsPermissions is not a function. (In 'Ti.Contacts.requestContactsPermissions', 'Ti.Contacts.requestContactsPermissions' is undefined)\",\r\n[ERROR] : \"native_stack\": [\r\n[ERROR] : \"JSExportClass::CallNamedFunction\"\r\n[ERROR] : ]\r\n[ERROR] : }\r\n{code}\r\n\r\nh5.Expected result\r\n\r\nThe same method should be used across all platforms", "attachment": [], "flagged": false, "summary": "Windows: Ti.Contacts permission methods need to renamed be to match iOS and Android", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Windows 10 Pro \r\nVisual Studio 2015 Community Update 2 \r\nAppc Core: 5.3.0-46 \r\nAppc NPM: 4.2.5-5 \r\nTi SDK: 5.3.0.v20160523083840\r\n", "closedSprints": [ { "id": 649, "state": "closed", "name": "2016 Sprint 13 SDK", "startDate": "2016-06-18T00:25:17.303Z", "endDate": "2016-07-02T00:25:00.000Z", "completeDate": "2016-07-04T04:25:16.889Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "389083", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/752", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-26T10:45:18.000+0000", "updated": "2016-06-26T10:45:18.000+0000" }, { "id": "395335", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nOS: Microsoft Windows 10 Pro 10.0.14393\r\nAppc core: 6.0.0-38\r\nAppc NPM: 4.2.8-6\r\nTi SDK: 6.0.0.v20160904203840\r\n\r\nCode in the description now works as expected, when the contacts capability exists the API returns a success, when it does not exist the API returns a failure\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-09-05T14:50:08.000+0000", "updated": "2016-09-05T14:50:08.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }