{ "id": "171463", "key": "TIMOB-25936", "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": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-04-06T21:13:15.000+0000", "created": "2018-04-05T18:20:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "mainthread", "qe-7.1.0" ], "versions": [ { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-04-06T22:37:47.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": "In a TableView, when appending a row immediately after appending a section, the elements appear in the reverse order (row and then section).\r\n\r\n*Steps to reproduce issue*:\r\n1. Create a classic app with the below code\r\n2. Run the app\r\n\r\n*Expected Results*:\r\nEach section has 3 rows under it\r\n\r\n*Actual Results*:\r\nAll of the rows appear first, then the sections\r\n\r\n*Notes*:\r\nIn the example, you can click on the window to add another section and row that also appear in reverse order.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: \"#f00\" });\r\nvar table = Ti.UI.createTableView();\r\n\r\nfor (var i = 0; i < 2; ++i) {\r\n\ttable.appendSection(Ti.UI.createTableViewSection({ headerTitle: \"Header \" + i, className: \"Header\" }));\r\n for (var j = 0; j < 3; j++) {\r\n \ttable.appendRow(Ti.UI.createTableViewRow({ title: \"Row \" + j, className: \"Row\" }));\r\n }\r\n}\r\n\r\nwin.addEventListener(\"click\", function() {\r\n\ttable.appendSection(Ti.UI.createTableViewSection({ headerTitle: \"Title\", className: \"Header\" }));\r\n\ttable.appendRow(Ti.UI.createTableViewRow({ title: \"Row \", className: \"Row\" }));\r\n});\r\n \r\nwin.add(table);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: TableView: Appending row immediately after a section appends them before the section", "creator": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "MacOS 10.13.3 (17D102)\r\nTi SDK 7.1.0.GA\r\nAppc NPM 4.2.12\r\nAppc CLI 7.0.2\r\nXcode 9.3 (9E145)\r\n", "comment": { "comments": [ { "id": "436584", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9986\r\nPR (7_1_X): https://github.com/appcelerator/titanium_mobile/pull/9987\r\n\r\nUnit-test part of the PR, test-case above.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-04-06T18:42:34.000+0000", "updated": "2018-04-06T18:43:12.000+0000" }, { "id": "436595", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. Sections and rows are appended in the correct order. Tested using the provided code as well as modifications to the project to append in different ways and/or orders.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-04-06T21:13:15.000+0000", "updated": "2018-04-06T21:13:15.000+0000" }, { "id": "436598", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified changes are in SDK builds 7.1.1.v20180406141533 & 7.2.0.v20180406141822", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-04-06T22:37:47.000+0000", "updated": "2018-04-06T22:37:47.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }