{ "id": "129148", "key": "ALOY-990", "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": [], "resolution": null, "resolutiondate": null, "created": "2014-04-17T03:35:48.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2014-06-18T22:54:10.000+0000", "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" } }, "components": [], "description": "Backbone.js model and collection creation functions accept an options argument, which Alloy's wrappers do not support.\r\n\r\nIn alloy.js\r\n\r\n{code}\r\nexports.createCollection = function(name, args) {\r\n\treturn new (require('alloy/models/' + ucfirst(name)).Collection)(args);\r\n};\r\n{code}\r\n\r\nIn backbone.js\r\n\r\n{code}\r\nvar Collection = Backbone.Collection = function(models, options) {\r\n options || (options = {});\r\n if (options.model) this.model = options.model;\r\n if (options.comparator) this.comparator = options.comparator;\r\n this._reset();\r\n this.initialize.apply(this, arguments);\r\n if (models) this.reset(models, {silent: true, parse: options.parse});\r\n };\r\n{code}\r\n\r\n\r\n{code}\r\n//It should fix it like this:\r\nexports.createCollection = function(name, attributes, options) {\r\n\treturn new (require('alloy/models/' + ucfirst(name)).Collection)(attributes, options);\r\n};\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Alloy : createCollection() should accept 'options' as an argument", "creator": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mdsb100", "key": "mdsb100", "displayName": "曹俊", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "302224", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering for further evaluation.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-23T17:27:30.000+0000", "updated": "2014-04-23T17:27:41.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }