{ "id": "125115", "key": "ALOY-932", "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": "15909", "description": "Alloy 1.5.0", "name": "Alloy 1.5.0", "archived": false, "released": true, "releaseDate": "2014-09-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-07-23T15:27:46.000+0000", "created": "2014-01-21T14:45:54.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-manualtest" ], "versions": [], "issuelinks": [], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2014-08-14T01:07:21.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": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "When attempting to bind to a complex object, such as the following, the resulting error messages are not clear and meaningful.\r\n\r\n{code}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nGenerates:\r\n\r\n{{\"'undefined' is not an object (evaluating 'Alloy.Models.photo.on')\";}}\r\n\r\nWhich doesn't clearly identify the problem being the attempt to reference the deep object reference {{photo.urls.square_75}}. \r\n\r\nAs pointed out in the original source of this ticket (http://developer.appcelerator.com/question/161740/alloymodelsphotoon#answer-274198), the solution is to map the object property to an attribute of the model, which could be done by extending the model or collection. Error message could possibly point developers to this solution.", "attachment": [], "flagged": false, "summary": "Improve error messages when attempting to bind to complex objects", "creator": { "name": "awamser", "key": "awamser", "displayName": "Alan Wamser", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "awamser", "key": "awamser", "displayName": "Alan Wamser", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium - SDK 3.2.0 - ti.alloy", "closedSprints": [ { "id": 159, "state": "closed", "name": "2014 Sprint 15 Alloy", "startDate": "2014-07-21T15:07:15.114Z", "endDate": "2014-08-04T15:07:00.000Z", "completeDate": "2014-08-02T18:09:47.110Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "315003", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/488\r\nTest app: https://github.com/feons/alloy/tree/ALOY-932/test/apps/testing/ALOY-932\r\n\r\nFunctional Test:\r\n\r\n Run the test app, Alloy compilation should fail with an error message identify the problem that the developer is trying to bind to a complex object.\r\n\r\n", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-07-21T10:16:25.000+0000", "updated": "2014-07-21T10:16:25.000+0000" }, { "id": "315476", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR merged", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-23T15:27:46.000+0000", "updated": "2014-07-23T15:27:46.000+0000" }, { "id": "318582", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified returning the expected error message, building for Android, iOS and MobileWeb, both from Appcelerator Studio and CLI:\r\n{code}\r\n[INFO] : ----- MVC GENERATION -----\r\n[INFO] : [global style] writing to cache...\r\n[INFO] : [models/fruits.js] model processing...\r\n[INFO] : [index.xml] view processing...\r\n[INFO] : style: \"index.tss\"\r\n[INFO] : view: \"index.xml\"\r\n[ERROR] : Attempt to reference the deep object reference : \"name.color\".\r\n[ERROR] : Instead, please map the object property to an attribute of the model.\r\n[ERROR] : Alloy compiler failed\r\n{code}\r\n\r\nTCMS Test added.\r\n\r\nTiSDK 3.4.0.v20140813022514\r\nAppcelerator Studio 3.3.1.201408121314 \r\nCLI 3.4.0-dev\r\nAlloy 1.5.0-dev\r\nXcode6-beta5\r\n\r\nClosing.\r\n", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-14T01:06:53.000+0000", "updated": "2014-08-14T01:07:16.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }