{ "id": "164483", "key": "TIMOB-24134", "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": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-02-06T08:00:21.000+0000", "created": "2016-11-10T17:36:03.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity", "qe-6.0.0" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "issuelinks": [ { "id": "53452", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "158381", "key": "TIMOB-22431", "fields": { "summary": "Ti.UI.TableView Test Suite: Titanium.UI.TableView Acceptance TIMOB-7914", "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": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-02-09T22:37:11.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\nWhen calling tableview.data/tableView.getData() on Windows it will return tableviewrows however on both iOS and Android it will always seem to return a tableviewsection regardless of if a tableviewsection has been added.\r\n\r\n{code}\r\nvar _window = Ti.UI.createWindow();\r\nvar table = Ti.UI.createTableView({\r\n top: 0,\r\n bottom: 0\r\n});\r\n\r\nvar tableData = [];\r\n\r\nfor (var i = 0; i < 10; i++) {\r\n tableData.push(Ti.UI.createTableViewRow({\r\n title: \"Row \" + (i + 1)\r\n }));\r\n}\r\n\r\ntable.setData(tableData);\r\n\r\n_window.add(table);\r\n\r\ntable.addEventListener(\"click\", function (e) {\r\n alert(table.data[0].rows[e.index].title);\r\n});\r\n_window.open();\r\n{code}\r\n\r\nI'm unsure which is the preferential behaviour\r\n\r\nh5.Steps to reproduce\r\n\r\n# Add the above code to an existing app.js and build for windows platform\r\n# Click update row\r\n# Observe logs\r\n\r\nh5.Actual result\r\n\r\nThe value returned is multiple tableviewrows \r\n\r\nh5.Expected result\r\n\r\nUnsure, but for parity with other platforms it should be a tableviewsection", "attachment": [ { "id": "61539", "filename": "6.1.0.v20170209111025 1.PNG", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-09T22:33:52.000+0000", "size": 11450, "mimeType": "image/png" }, { "id": "61469", "filename": "Screen Shot 2017-02-07 at 1.31.42 PM.png", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-07T21:32:15.000+0000", "size": 99108, "mimeType": "image/png" } ], "flagged": false, "summary": "Windows: tableview.data/getData does not return a tableviewsection ", "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": "OS: Microsoft Windows 10 Pro 10.0.14393\r\nAppc core: 6.0.0-69\r\nAppc NPM: 4.2.8-9\r\nTi SDK: 6.0.0.v20161109075403", "closedSprints": [ { "id": 808, "state": "closed", "name": "2017 Sprint 03 SDK", "startDate": "2017-01-28T21:12:30.215Z", "endDate": "2017-02-12T21:12:00.000Z", "completeDate": "2017-02-12T23:37:14.667Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "405816", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "As far as I can see from the source, {{data}} always returns {{TableViewSection[]}} on [iOS|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUITableViewProxy.m#L782] and [Android|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/TableViewProxy.java#L697]. The reason why type of {{Ti.UI.TableView.data}} is marked both {{Titanium.UI.TableViewRow[]/Titanium.UI.TableViewSection[]}} in [API doc|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-property-data] I think is that it _accepts_ {{Titanium.UI.TableViewRow[]}} as well as {{Titanium.UI.TableViewSection[]}} whereas {{data}} always _returns_ {{Titanium.UI.TableViewSection[]}}. So Windows implementation was wrong in this case.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-01-31T05:00:08.000+0000", "updated": "2017-01-31T05:00:46.000+0000" }, { "id": "406047", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/940", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-01T15:44:48.000+0000", "updated": "2017-02-01T15:44:48.000+0000" }, { "id": "406537", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~kota] with the code provided in the description and with the code in https://github.com/appcelerator/titanium_mobile_windows/pull/940 I get the following error message on the windows mobile. \r\n\r\n!Screen Shot 2017-02-07 at 1.31.42 PM.png|thumbnail!\r\n\r\n*Environment*\r\n{code:java}\r\nPhone : Lumia 640 LTE (RM-1073)\r\nOperating System:\r\nName = Microsoft Windows 10 Pro\r\nVersion = 10.0.14393\r\nArchitecture = 32bit\r\n# CPUs = 4\r\nMemory = 17034395648\r\n \r\nNode.js:\r\nNode.js Version = 4.6.0 \r\nnpm Version = 2.15.9\r\n \r\nTitanium SDK:\r\nSDK Version = 6.1.0.v20170206114448\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-07T21:34:29.000+0000", "updated": "2017-02-07T21:54:23.000+0000" }, { "id": "406783", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with the test code provided in the description. Was able to see an alert with the row number which had been clicked. \r\n\r\n!6.1.0.v20170209111025 1.PNG|thumbnail!\r\n\r\n*Environment*\r\n{code:java}\r\nPhone : Lumia 640 LTE (RM-1073)\r\nOperating System:\r\nName = Microsoft Windows 10 Pro\r\nVersion = 10.0.14393\r\nArchitecture = 32bit\r\n# CPUs = 4\r\nMemory = 17034395648\r\n \r\nNode.js:\r\nNode.js Version = 4.6.0 \r\nnpm Version = 2.15.9\r\n \r\nTitanium SDK:\r\nSDK Version = 6.1.0.v20170209111025\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-09T22:36:30.000+0000", "updated": "2017-02-09T22:36:30.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }