{ "id": "132418", "key": "ALOY-1064", "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": "15909", "description": "Alloy 1.5.0", "name": "Alloy 1.5.0", "archived": false, "released": true, "releaseDate": "2014-09-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-08-05T05:31:15.000+0000", "created": "2014-06-30T19:28:17.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-manualtest" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2014-09-13T16:40:54.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": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "Given a project containing a widget and this in index.xml:\r\n\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nThe widget receives an arguments object containing two extra {{null}} values which presumably correspond to the ItemTemplate tags. Those should be removed by the Ti.UI.ListView.js parser.\r\n\r\nGenerated code without this change:\r\n{code}\r\n$.__views.__alloyId0 = Alloy.createWidget(\"foo\", \"widget\", {\r\n id: \"__alloyId0\",\r\n children: [ , , $.__views.__alloyId1 ],\r\n __parentSymbol: $.__views.index\r\n});\r\n{code}\r\n\r\nUsing child views of Widget other than ListView (such as using a pair of Views) does not pass those null values via the children array.\r\n\r\nWorkaround: reference the children array like this:\r\n\r\n{code}\r\nvar kids = _.compact(arguments[0].children);\r\nTi.API.info(JSON.stringify(kids));\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "ListView parser should remove Templates node after processing the templates", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 169, "state": "closed", "name": "2014 Sprint 16 Alloy", "startDate": "2014-08-04T14:48:59.768Z", "endDate": "2014-08-16T00:00:00.000Z", "completeDate": "2014-08-18T15:31:13.725Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "316816", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/499\r\nTest app: https://github.com/feons/alloy/tree/ALOY-1064/test/apps/testing/ALOY-1064\r\n\r\nFunctional Test:\r\n\r\n 1. Compile test app on iOS\r\n 2. There should be no null values for widget's children property. The generated code should look like this:\r\n{code}\r\n128 $.__views.__alloyId0 = Alloy.createWidget(\"foo\", \"widget\", {\r\n129 id: \"__alloyId0\",\r\n130 children: [ $.__views.__alloyId1 ],\r\n131 __parentSymbol: $.__views.index\r\n132 });\r\n{code}\r\n\r\n", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-08-04T09:26:57.000+0000", "updated": "2014-08-04T09:26:57.000+0000" }, { "id": "323492", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed on iOS 8 (iPAD mini) and Android 4.3 \r\n\r\nTiSDK 3.4.0.v20140912164913\r\nAppcelerator Studio 3.4.0.201409121853\r\nCLI 3.4.0-rc3\r\nAlloy 1.5.0-rc\r\nXcode6 GM\r\n\r\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-13T16:40:27.000+0000", "updated": "2014-09-13T16:40:27.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }