{ "id": "173561", "key": "ALOY-1684", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "20671", "description": "Alloy items that will be included in CLI 7.1.0", "name": "CLI Release 7.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" }, { "id": "20836", "name": "Alloy 1.14.0", "archived": false, "released": true, "releaseDate": "2019-07-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-06-19T14:21:46.000+0000", "created": "2019-04-30T13:26:25.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "20486", "name": "Alloy 1.13.9", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2019-06-19T14:21:46.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": "13610", "name": "Builtins", "description": "Builtin Javascript libraries" }, { "id": "13605", "name": "Models" } ], "description": "h5.Description\r\n\r\nhttps://github.com/appcelerator-developer-relations/appc-sample-databinding is the sample used to demo this\r\n\r\nWhen calling {{.sort()}} on a collection the dataFunction should be called, however when using backbone 1.1.2 or above, this is not called. This is because (as noted in the [migration guide|https://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Backbone_Migration-section-src-43290758_AlloyBackboneMigration-EventAPIs]), sort no longer triggers a reset event but a sort event, and we don't listen for a sort event [at all|https://github.com/appcelerator/alloy/blob/master/Alloy/common/constants.js#L69], to fix this we need to add \"sort\" to that array (probably conditionally when using 1.1.2 or greater), but this will potentially introduce an unexpected behaviour change for users\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Download https://github.com/appcelerator-developer-relations/appc-sample-databinding\r\n2. Build the app to any platform\r\n3. Click on \"orange\"\r\n4. Click the \"+\" button\r\n5. Go back to the main view\r\n6. Click \"Sort: name\"\r\n7. Select \"Amount\"\r\n8. Now add {{\"backbone\": \"1.1.2\"}} to your {{app/config.json}}, clean the project and repeat steps 2-7\r\n\r\nh5.Expected\r\n\r\nWhen changing the sort type to amount, orange should go to the top of the list\r\n\r\nh5.Actual\r\n\r\nWhen using backbone 1.1.2, the list is not sorted when changing the sort type", "attachment": [], "flagged": false, "summary": "Calling sort for a collection does not call the dataFunction as of backbone 1.1.2 and above", "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": "Alloy 1.13.9\r\nBackbone: 1.1.2, 1.3.3", "closedSprints": [ { "id": 1141, "state": "closed", "name": "2019 Sprint 12", "startDate": "2019-06-03T22:00:37.435Z", "endDate": "2019-06-14T22:00:00.000Z", "completeDate": "2019-06-15T03:44:20.826Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "448071", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "cc [~bhouse] [~topener], I ran into this while performing the backbone 1.4.0 upgrade. Do you think this is something we can fix safely, or would the potential behaviour change be problematic for users?", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-04-30T13:27:31.000+0000", "updated": "2019-04-30T13:27:43.000+0000" }, { "id": "448855", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Included in the PR for the backbone 1.4.0 inclusion\r\nhttps://github.com/appcelerator/alloy/pull/929/commits/22ac957bbfd6e696a10cbb8a10726951d2254061", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-06-05T13:48:16.000+0000", "updated": "2019-06-05T13:48:16.000+0000" }, { "id": "449196", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*, Fix verified in CLI Version {{7.1.0-master.21}} tested using the test case mentioned in the description. When changing the sort type to amount, orange was able to go to the top of the list\r\n\r\n*Test Environment*\r\n{code:java}\r\nSDK: 8.0.2.GA\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.14.4\r\n Architecture = 64bit\r\n CPUs = 8\r\n Memory = 16.0GB\r\nNode.js\r\n Node.js Version = 10.13.0\r\n npm Version = 6.4.1\r\nAppcelerator CLI\r\n Installer = 4.2.14-3\r\n Core Package = 7.1.0-master.21\r\nTitanium CLI\r\n CLI Version = 5.2.1\r\n node-appc Version = 0.2.49\r\n{code}\r\n\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-19T14:21:34.000+0000", "updated": "2019-06-19T14:21:34.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }