{ "id": "173779", "key": "TIMOB-27165", "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": "20884", "name": "Release 8.2.1", "archived": false, "released": true, "releaseDate": "2019-10-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-04T13:58:35.000+0000", "created": "2019-06-19T11:02:30.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [ { "id": "58852", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "175700", "key": "TIMOB-28225", "fields": { "summary": "Ti.UI.PushNotification Test Suite: Titanium.UI.PushNotification Acceptance TIMOB-27165 iOS Only", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "10100", "description": "This Issue Type is used to create Zephyr Test within Jira.", "name": "Test", "subtask": false } } } } ], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2020-11-04T03:51:49.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": [], "description": "*Describe the bug*\r\nWhen adding category with an action to an iOS local notification the localnotificationaction always contains the notification identifier instead of the action identifier.\r\n\r\n*To Reproduce*\r\n# Create a notification action with an identifier\r\n# Create a category with the action\r\n# Schedule notification with the category\r\n# Print the localnotificationaction object\r\n# Check the identifier\r\n\r\n{code:java}\r\nvar ACTION = \"action\";\r\nvar CATEGORY = \"category\";\r\n\r\nfunction onSchedule() {\r\n Ti.App.iOS.scheduleLocalNotification({\r\n date: new Date(new Date().getTime() + 5000),\r\n alertBody: \"Hello\",\r\n identifier: \"notification 1\",\r\n category: CATEGORY\r\n });\r\n}\r\n\r\nfunction onLocalNotificationAction(e) {\r\n console.log('Action: ' + e.identifier);\r\n}\r\n\r\nfunction onOpen() {\r\n Ti.App.iOS.addEventListener('localnotificationaction', onLocalNotificationAction);\r\n\r\n var action = Ti.App.iOS.createUserNotificationAction({\r\n identifier: ACTION,\r\n title: \"My Action\",\r\n activationMode: Ti.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND\r\n });\r\n\r\n var category = Ti.App.iOS.createUserNotificationCategory({\r\n identifier: CATEGORY,\r\n actionsForDefaultContext: [action],\r\n actionsForMinimalContext: [action]\r\n });\r\n\r\n Ti.App.iOS.registerUserNotificationSettings({\r\n types: [\r\n Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT,\r\n Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND,\r\n Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE\r\n ],\r\n categories: [category]\r\n });\r\n}\r\n\r\nvar win = Ti.UI.createWindow();\r\nwin.addEventListener('open', onOpen);\r\n\r\nvar button = Ti.UI.createButton({\r\n title: \"Schedule\"\r\n});\r\nbutton.addEventListener('click', onSchedule);\r\nwin.add(button);\r\n\r\nwin.open();\r\n{code}\r\n\r\n*Expected behavior*\r\nThe identifier has the value of the action\r\n\r\n*Actual behavior*\r\nThe identifier has the value of the notification\r\n\r\n*Environment*\r\nTitanium SDK version: 7.5.2.GA; 8.0.1.GA\r\n\r\nI did create a pull request for this, but I want to be sure that it will be picked up: https://github.com/appcelerator/titanium_mobile/pull/10940", "attachment": [], "flagged": false, "summary": "iOS: The localnotificationaction event always contains the notification identifier instead of the action identifier", "creator": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "7.5.0.GA;7.5.2.GA; 8.0.1.GA", "comment": { "comments": [ { "id": "449189", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/10940", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-19T11:37:46.000+0000", "updated": "2019-06-19T11:37:46.000+0000" }, { "id": "449547", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed on Master. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-07-02T14:46:01.000+0000", "updated": "2019-07-02T14:46:01.000+0000" }, { "id": "451460", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged PR to master, created an 8_2_X PR intended for 8.2.1 here: https://github.com/appcelerator/titanium_mobile/pull/11226", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-09-17T19:58:12.000+0000", "updated": "2019-09-17T19:58:12.000+0000" }, { "id": "451639", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed on 8_2_X as well. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-26T12:59:34.000+0000", "updated": "2019-09-26T12:59:34.000+0000" }, { "id": "451784", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to 8_2_X", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-10-02T20:32:39.000+0000", "updated": "2019-10-02T20:32:39.000+0000" }, { "id": "451850", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket, fix verified SDK version 8.3.0.v20191003144543 and 8.2.1.v20191003075717.\r\n\r\nTest and other information cab be found at: \r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/10940\r\n8_2_X: https://github.com/appcelerator/titanium_mobile/pull/11226", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-04T13:58:30.000+0000", "updated": "2019-10-04T13:58:30.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }