{ "id": "148420", "key": "ALOY-1326", "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": "2015-06-02T12:57:59.000+0000", "priority": null, "labels": [ "alloy", "collections", "controllers", "models" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2015-11-05T15:18:38.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13605", "name": "Models" }, { "id": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" } ], "description": "The name of the controller can also be a relative path. But to make it uniform (just like with images) you should be able to add a / in front of the name/path. It currently doesn't support that. This fix resolves that for controllers,models and collections, and adds to the documentation it can also be a relative path.\r\n\r\nAn example why this should be supported is because it is consistent for everything. Image names/paths with a leading / on Android is even required, and a controller name/path with a leading / is generating errors. This leads to unexpected issues, and confusion.\r\n\r\nThis fix makes it consistent:\r\n\r\n\r\n{code:javascript}\r\nAlloy.createController('name'); // will work\r\nAlloy.createController('/path/to/controller'); // will also work\r\n$.imageView.image = '/path/to/image.png' // will (only) work\r\nAlloy.createCollection('name'); // will work\r\nAlloy.createCollection('/path/to/collection'); // will work\r\n{code}\r\n\r\nConsistent behaviour across all names/paths leads to expected functionality. Exceptions make it confusion. This fixes that", "attachment": [], "flagged": false, "summary": "Paths and names of Collections/Images/Controllers is not consistent.", "creator": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "354083", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "I added a Pull Request to GitHub for this fix: https://github.com/appcelerator/alloy/pull/695", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-06-02T12:58:26.000+0000", "updated": "2015-06-02T12:58:26.000+0000" }, { "id": "356147", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "PR has been accepted", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-06-26T23:53:53.000+0000", "updated": "2015-06-26T23:53:53.000+0000" }, { "id": "369098", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "The PR still has to be merged, so reopening.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-05T15:18:06.000+0000", "updated": "2015-11-05T15:18:06.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }