{ "id": "154144", "key": "ALOY-1346", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "17081", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" }, { "id": "17627", "name": "alloy 1.7.31", "archived": false, "released": true, "releaseDate": "2016-01-05" }, { "id": "17651", "name": "alloy 1.7.32", "archived": false, "released": true, "releaseDate": "2016-01-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-01-07T21:17:54.000+0000", "created": "2016-01-06T15:54:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" }, { "id": "17627", "name": "alloy 1.7.31", "archived": false, "released": true, "releaseDate": "2016-01-05" } ], "issuelinks": [ { "id": "50228", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "154146", "key": "TIDOC-2414", "fields": { "summary": "Alloy Controller Guide: Use $.args instead of arguments[0]", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "50239", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "154163", "key": "ALOY-1348", "fields": { "summary": "Provide better inline documentation/comments for generated files", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "batman", "key": "batman", "displayName": "Bruce Wayne", "active": true, "timeZone": "America/New_York" }, "updated": "2016-01-20T22:47:02.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": "12600", "name": "Samples & Templates" } ], "description": "Since Alloy 1.6.0 (by ALOY-1092) the compiled controllers [have the following line|https://github.com/appcelerator/alloy/blob/master/Alloy/template/component.js#L20]:\r\n\r\n{code:javascript}\r\n\tthis.args = arguments[0] || {};\r\n\t// ..\r\n\tvar $ = this;\r\n{code}\r\n\r\nStill, our [template for new controllers|https://github.com/appcelerator/alloy/blob/master/Alloy/template/controller.js] has:\r\n\r\n{code:javascript}\r\nvar args = arguments[0] || {};\r\n{code}\r\n\r\nClearly this is no longer needed. The template can be emptied and the availability of {{$.args}} should be documented. I'll create a separate TIDOC ticket for that.", "attachment": [], "flagged": false, "summary": "Controller template should no longer declare args variable", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": null, "closedSprints": [ { "id": 571, "state": "closed", "name": "2016 Sprint 01 Tooling", "startDate": "2016-01-04T21:10:00.000Z", "endDate": "2016-01-15T21:10:00.000Z", "completeDate": "2016-02-01T17:31:00.734Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "373905", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "PR: https://github.com/appcelerator/alloy/pull/749", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-01-06T16:04:51.000+0000", "updated": "2016-01-06T16:04:51.000+0000" }, { "id": "374011", "author": { "name": "magnatronus", "key": "magnatronus", "displayName": "Steve Rogers", "active": true, "timeZone": "Europe/London" }, "body": "Is this possible\r\n\r\nhttps://community.appcelerator.com/topic/4499/user-definable-alloy-templates\r\n", "updateAuthor": { "name": "magnatronus", "key": "magnatronus", "displayName": "Steve Rogers", "active": true, "timeZone": "Europe/London" }, "created": "2016-01-07T14:51:47.000+0000", "updated": "2016-01-07T14:51:47.000+0000" }, { "id": "374012", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~magnatronus] Right now it's hard coded to look under the built-in templates:\r\nhttps://github.com/appcelerator/alloy/blob/master/Alloy/commands/generate/generateUtils.js#L31\r\n\r\nIt would be a great feature request though (if not already present). Could you look that up and if needed create a ticket?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-01-07T14:58:24.000+0000", "updated": "2016-01-07T14:58:39.000+0000" }, { "id": "374033", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR merged.\r\n\r\nFunctional Test:\r\n1. create a new controller {{alloy generate controller newcontrol}}\r\n2. The first line of the new controller file should not be {code} var args = arguments[0] || {}; {code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2016-01-07T21:17:54.000+0000", "updated": "2016-01-07T21:17:54.000+0000" }, { "id": "375006", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11.3 (15D21)\r\nStudio 4.4.0.201511241829\r\nTi SDK 5.2.0.v20160114021251\r\nAppc NPM \r\nAppc CLI 5.2.0-232\r\nXcode 7.2 (7C68)\r\nNode v0.12.7\r\nJava 1.7.0_80\r\n\r\nController template now uses new wording and uses $.args instead of arguments[0].", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-01-20T22:47:02.000+0000", "updated": "2016-01-20T22:47:02.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }