{ "id": "175319", "key": "TIMOB-28020", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-07-28T20:37:10.000+0000", "created": "2020-07-15T22:01:22.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-07-28T20:37:14.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "- Amend {{Ti.UI.Shortcut}} click event to include {{item}} as Shortcut item instead\r\n\r\n*TEST CASE*\r\n{code:js}\r\nconst window = Ti.UI.createWindow({ backgroundColor: 'grey', layout: 'vertical' });\r\nconst shortcut = Ti.UI.createShortcut();\r\n\r\nlet lastShortcutItem;\r\n\r\nfunction test(title, callback) {\r\n\tconst button = Ti.UI.createButton({ title, top: 50 });\r\n\tbutton.addEventListener('click', callback);\r\n\twindow.add(button);\r\n}\r\n\r\ntest('ADD RANDOM SHORTCUT', _ => {\r\n\tconst rand = Math.floor(Math.random() * (999 - 1)) + 1;\r\n\tconst item = Ti.UI.createShortcutItem({\r\n \tid: `test_shortcut_${rand}`,\r\n \ttitle: `SHORTCUT_${rand}`,\r\n \tdescription: `DESCRIPTION_${rand}`\r\n });\r\n\tlastShortcutId = item;\r\n\tshortcut.add(item);\r\n});\r\n\r\ntest('REMOVE LAST SHORTCUT', _ => {\r\n\ttry {\r\n\t\tshortcut.remove(lastShortcutItem);\r\n\t} catch { }\r\n});\r\n\r\ntest('REMOVE ALL SHORTCUTS', _ => {\r\n\tshortcut.removeAll();\r\n});\r\n\r\ntest('NUMBER OF SHORTCUTS', _ => {\r\n\talert(`staticItems: ${shortcut.staticItems.length}`);\r\n\talert(`items: ${shortcut.items.length}`);\r\n});\r\n\r\nTi.UI.Shortcut.addEventListener('click', e => {\r\n\t// e should contain 'item'\r\n\tconsole.log('shortcut: ' + JSON.stringify(e, null, 1));\r\n});\r\n\r\nwindow.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Parity with iOS Shortcut click event payload", "creator": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1201, "state": "closed", "name": "2020 Sprint 14", "startDate": "2020-07-06T15:40:00.000Z", "endDate": "2020-07-17T15:40:00.000Z", "completeDate": "2020-07-20T22:16:28.367Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "456114", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/11823", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-15T22:04:10.000+0000", "updated": "2020-07-15T22:04:10.000+0000" }, { "id": "456133", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed\r\nWaiting for Jenkins build", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-16T20:08:04.000+0000", "updated": "2020-07-16T20:08:04.000+0000" }, { "id": "456146", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master for 9.1.0 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-07-17T18:36:55.000+0000", "updated": "2020-07-17T18:36:55.000+0000" }, { "id": "456256", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS: 10.15.4\r\nSDK: 9.1.0.v20200727104531\r\nAppc CLI: 8.0.0\r\nJDK: 11.0.4\r\nNode: 10.17.0\r\nStudio: 6.0.0.202005141803\r\nDevice: Pixel3(v10.0) emulator", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-28T17:36:00.000+0000", "updated": "2020-07-28T20:37:03.000+0000" }, { "id": "456257", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to edit comment", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-28T20:36:50.000+0000", "updated": "2020-07-28T20:36:50.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }