{ "id": "111970", "key": "ALOY-594", "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": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" }, { "id": "15529", "description": "2013 Sprint 13", "name": "2013 Sprint 13", "archived": true, "released": true, "releaseDate": "2013-07-01" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-20T22:41:43.000+0000", "created": "2013-03-30T14:25:12.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "Alloy", "bindings", "bug", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-15T23:57:23.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": "13605", "name": "Models" }, { "id": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" } ], "description": "Hi Tony,\r\n\r\nIf I call a collection: \"collection\", and use bindings, it will fail:\r\n\r\nThis fails:\r\n{code}\r\nvar models = datafilter(Alloy.Collections.collection);\r\n{code}\r\n\r\nif it was:\r\n{code}\r\nvar models = datafilter(Alloy.Collections[\"collection\"]);\r\n{code}\r\nit would not fail. ", "attachment": [ { "id": "40099", "filename": "Screen Shot 2013-06-20 at 6.40.41 PM.png", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T22:42:01.000+0000", "size": 42968, "mimeType": "image/png" } ], "flagged": false, "summary": "Alloy: Naming a collection \"collection\" will fail", "creator": { "name": "viezel", "key": "viezel", "displayName": "Mads Moller", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Alloy 1.0, SDK 3.0.2", "comment": { "comments": [ { "id": "245173", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you explain what \"datafilter\" is?", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-02T14:09:36.000+0000", "updated": "2013-04-02T14:09:36.000+0000" }, { "id": "245180", "author": { "name": "viezel", "key": "viezel", "displayName": "Mads Moller", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi Tony, \r\n\r\nIts your generated code:\r\n\r\nlike this:\r\n\r\nvar __alloyId27 = function(e) {\r\n var models = datafilter($.tipcollection), len = models.length, rows = [];\r\n\r\n\r\nthe alloy xml is:\r\n\r\n\r\n...\t\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "viezel", "key": "viezel", "displayName": "Mads Moller", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-04-02T14:28:09.000+0000", "updated": "2013-04-02T14:28:09.000+0000" }, { "id": "245401", "author": { "name": "viezel", "key": "viezel", "displayName": "Mads Moller", "active": true, "timeZone": "Europe/Berlin" }, "body": "I was not clear. The above code works, because I use $.tipcollection. Its a local collection. \r\nThe bug I reported was if I called my collection \"collection\" like this: Alloy.createCollection(\"collection\");\r\n", "updateAuthor": { "name": "viezel", "key": "viezel", "displayName": "Mads Moller", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-04-03T06:01:16.000+0000", "updated": "2013-04-03T06:01:16.000+0000" }, { "id": "258855", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This was resolved by an earlier commit. I created a test app to confirm this and prevent regressions going forward.\r\n\r\nPR: https://github.com/appcelerator/alloy/pull/161\r\ntest app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-594\r\n\r\nThe app can be run with 2 possible settings in the *config.json* file:\r\n\r\n1. {code}\"useAlloyModel\": true{code}This will use a full-fledged Alloy model to test the issue. Since it uses the sql adapter, this setting can only be tested on iOS and Android\r\n2. {code}\"useAlloyModel\": false{code}This can be tested on all supported platforms as it uses plain old Backbone models and no persistence\r\n\r\nTo confirm functional testing, when the app is run it should present the attached screenshot showing filtered and transformed models in a collection named *collection* that are represented as rows.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-20T22:41:43.000+0000", "updated": "2013-06-20T22:41:43.000+0000" }, { "id": "261931", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified as fixed.\n\nEnvironment:\nTitanium SDK 3.1.2.v20130710144553\nAppcelerator Studio 3.1.2.201307101037\nAlloy 1.2.0\n\nAndroid 4.2.2 and iOS 5.\nMobileWeb checked for case #2 (no SQL adapter)\n\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T23:57:14.000+0000", "updated": "2013-07-15T23:57:14.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }