{ "id": "97571", "key": "ALOY-112", "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": "14791", "description": "2012 Sprint 15", "name": "2012 Sprint 15", "archived": true, "released": false }, { "id": "14176", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": false, "released": true, "releaseDate": "2012-12-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-07-26T12:03:53.000+0000", "created": "2012-07-18T10:37:27.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-03-07T22:25:52.000+0000", "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" } }, "components": [ { "id": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": "Currently the custom model function syntax requires an anonymous Javascript function to be housed in a \"js\" file as the same name as the model \"json\" file. It typically looks like this:\r\n\r\n{code:javascript}\r\nfunction(Model) {\r\n // do stuff to model\r\n return Model;\r\n}\r\n{code}\r\n\r\nThe anonymous function syntax causes a syntax error in TiStudio because an anonymous function alone is not valid Javascript syntax. We need to modify the custom model template and function to prevent this.", "attachment": [], "flagged": false, "summary": "Improve syntax of custom model functions", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "208978", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "There are a couple solution. One I think one is not to use anonymous and perhaps return a var. Another solutions is to use a custom extension. The priority of this is high because it makes Alloy projects look messed up, although there is actually no problem in generation/parser.", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-23T15:12:09.000+0000", "updated": "2012-07-23T15:12:09.000+0000" }, { "id": "208988", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "we definitely don't need a custom extension, it's just JS. It's a little more complicated than just return a var, but not too much. I'll have to modify the template as well as the syntax in the definition. ", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-23T15:32:14.000+0000", "updated": "2012-07-23T15:32:14.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }