{ "id": "152553", "key": "ALOY-1323", "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": "17081", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" }, { "id": "17519", "name": "alloy 1.7.27", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-11-20T17:35:47.000+0000", "created": "2015-11-01T18:49:35.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "17082", "name": "alloy 1.7.16", "archived": false, "released": true, "releaseDate": "2015-10-08" }, { "id": "17475", "name": "alloy 1.7.26", "archived": false, "released": true, "releaseDate": "2015-11-16" } ], "issuelinks": [ { "id": "49621", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "130558", "key": "ALOY-1018", "fields": { "summary": "Add defaultNamespace or module attribute to Alloy Tag", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2016-02-02T21:23:00.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": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "The attached app-folder demonstrates that when you use the {{module}} tag on the {{}} tag of one view, this will be applied to *all* other controller-views as well.\r\n\r\n1. Compile the app.\r\n2. Open {{Resources/iphone/controllers/testWindow.js}}.\r\n3. Confirm that it has {{(require(\"testModule\").createWindow || Ti.UI.createWindow)}} for all views as well, while only {{app/views/index.xml}} has has the {{module}} tag.\r\n\r\nFound by [~falko]", "attachment": [ { "id": "57216", "filename": "app.zip", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-01T18:49:55.000+0000", "size": 3723, "mimeType": "application/zip" } ], "flagged": false, "summary": "Alloy: module-tag in Alloy element effects all controller-views", "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": "Alloy 1.7.16", "closedSprints": [ { "id": 531, "state": "closed", "name": "2015 Sprint 23 Tooling", "startDate": "2015-11-10T23:44:28.164Z", "endDate": "2015-11-21T02:44:00.000Z", "completeDate": "2015-11-23T20:21:44.795Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "368875", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "According to ALOY-1018, this doesn't seem like a bug.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-11-03T21:40:56.000+0000", "updated": "2015-11-03T21:40:56.000+0000" }, { "id": "368880", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "what do you say to that?\r\n\r\n*/app/lib/testModule.js*\r\n{code:javascript}\r\nexports.createLabel = function(opts) {\r\n\treturn Ti.UI.createLabel(_.extend(opts, {\r\n\t\ttext: \"Click me!\"\r\n\t}));\r\n};\r\n{code}\r\n\r\n*app/controllers/index.js*\r\n{code:javascript}\r\nfunction doClick(e) {\r\n Alloy.createController('testWindow').getView().open();\r\n}\r\n$.index.open();\r\n{code}\r\n\r\n*app/views/index.xml*\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\r\n{code}\r\n\r\n\r\n*app/views/testWindow.xml*\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-11-03T22:00:29.000+0000", "updated": "2015-11-03T22:00:29.000+0000" }, { "id": "368882", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "I think it is bad idea to propogate Alloy tag attribute specified in one View to the all other Views.\r\nIt can be lead to bugs that very hard to find.", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-11-03T22:05:26.000+0000", "updated": "2015-11-03T22:07:33.000+0000" }, { "id": "368883", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~falko], would this work for you?\r\n\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\r\n{code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-11-03T22:07:25.000+0000", "updated": "2015-11-03T22:07:25.000+0000" }, { "id": "368969", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "Each View must relate to only his controller implementation and not has influence to other.", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-11-04T11:42:19.000+0000", "updated": "2015-11-04T11:42:19.000+0000" }, { "id": "368970", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~fmiao] this *is* a bug. ALOY-1018 does not request for the {{module}} tag on an {{Alloy}} element to effect all views in the app, only the current.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-04T11:44:37.000+0000", "updated": "2015-11-04T11:44:37.000+0000" }, { "id": "368971", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "I can build controller with many views at root under Alloy tag and in this case I can use module attribute in Alloy tag but it not must has influence to other controllers.", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-11-04T11:45:32.000+0000", "updated": "2015-11-04T11:45:32.000+0000" }, { "id": "369805", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "This seems to be broken from version 1.7.8 to the current version 1.7.24", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2015-11-11T21:14:37.000+0000", "updated": "2015-11-11T21:14:37.000+0000" }, { "id": "369815", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "I am not opposed to this being a feature that is available to developers but I think it should probably go somewhere more global.", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2015-11-11T22:30:51.000+0000", "updated": "2015-11-11T22:30:51.000+0000" }, { "id": "370037", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "It must work like autoStyle:\r\n\r\n{code:java}\r\n To enable autostyle, set the autoStyle attribute to true either in the XML markup or the config.json file. You can enable autostyle for a individual component, for all components in a controller, or for all controllers in a project.\r\n\r\n* To enable autostyle for an individual component, set the autoStyle attribute to true on the XML tag (for example, ).\r\n* To enable autostyle for components in a controller, set the autoStyle attribute to true on the root tag (for example, ).\r\n* To enable autostyle for all controllers in an Alloy project, set the autoStyle field to true in the config.json file, for example:\r\n\r\n{code}\r\n", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-11-12T07:25:40.000+0000", "updated": "2015-11-12T07:26:04.000+0000" }, { "id": "370109", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "[~brentonhouse], what exactly is broken from 1.7.8? Did the module property work differently in earlier versions? ", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-11-12T18:16:48.000+0000", "updated": "2015-11-12T18:16:48.000+0000" }, { "id": "370897", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/742\r\n\r\nTo Test:\r\n1. Test for ALOY-1018 should pass.\r\n2. Run attached app, {{Resources/iphone/controllers/testWindow.js}} shouldn't have {{(require(\"testModule\").createWindow || Ti.UI.createWindow)}} for all views.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-11-19T22:52:15.000+0000", "updated": "2015-11-19T22:52:15.000+0000" }, { "id": "370966", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "I confirm. \r\n{code}(require(\"testModule\").create... || Ti.UI.create...){code}\r\n only present in controller which contains `module` attribute in his `alloy` tag.\r\nTested on your branch ALOY-1323", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2015-11-20T08:22:18.000+0000", "updated": "2015-11-20T08:24:16.000+0000" }, { "id": "371006", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Thank you [~falko]!", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-11-20T17:35:13.000+0000", "updated": "2015-11-20T17:35:13.000+0000" }, { "id": "371007", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR merged.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-11-20T17:35:47.000+0000", "updated": "2015-11-20T17:35:47.000+0000" }, { "id": "371097", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "Is there now a global way of doing this such as in the config.json file?", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2015-11-23T05:03:48.000+0000", "updated": "2015-11-23T05:03:48.000+0000" }, { "id": "371125", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "No, we now fixed the bug this ticket was about. You can do a new ticket for a feature request for this.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-23T09:59:20.000+0000", "updated": "2015-11-23T09:59:20.000+0000" }, { "id": "375764", "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.5.0.201601262138\r\nTi SDK 5.2.0.v20160202103508\r\nAppc NPM 4.2.3-1\r\nAppc CLI 5.2.0-239\r\nAlloy 1.7.33\r\nXcode 7.2 (7C68)\r\n\r\nUsing the module property on the tag no longer applies to the sub views. Tested using the provided sample app contents and the code in ALOY-1018.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-02T21:23:00.000+0000", "updated": "2016-02-02T21:23:00.000+0000" } ], "maxResults": 21, "total": 21, "startAt": 0 } } }