{ "id": "138300", "key": "ALOY-1174", "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": "16596", "name": "Alloy 1.6.0", "archived": false, "released": true, "releaseDate": "2015-05-21" }, { "id": "16692", "name": "Alloy 1.7.0", "archived": false, "released": true, "releaseDate": "2015-07-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-28T15:14:26.000+0000", "created": "2014-10-20T19:57:12.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2015-02-14T02:35:25.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" } ], "description": "Per comments at [Hacking alloy to get promises to work|https://github.com/aaronksaunders/tiConnectSampleApp#hacking-of-alloyjs-to-get-promises-to-work], the core model/collection constructors could be modified simply to support using promises in addition to callbacks. As shown in [Aaron's TiConnect sample|https://github.com/aaronksaunders/tiConnectSampleApp/blob/master/app/alloy.js#L22] the change involves returning the results of the sync call.\r\n\r\nResolving this cannot break existing apps, so extensive testing should be done on all platforms.", "attachment": [ { "id": "54111", "filename": "app.zip", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-12T20:46:47.000+0000", "size": 5935536, "mimeType": "application/zip" } ], "flagged": false, "summary": "Update sync adapters to support promises in addition to callbacks", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 248, "state": "closed", "name": "2014 Sprint 22 Alloy", "startDate": "2014-10-27T13:32:25.636Z", "endDate": "2014-11-10T13:32:00.000Z", "completeDate": "2014-11-10T15:54:03.714Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "329749", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Community PR for this: https://github.com/appcelerator/alloy/pull/613\r\n\r\nPasses all tests, all models/* test apps run without issues. Merged.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-28T15:14:20.000+0000", "updated": "2014-10-28T15:14:20.000+0000" }, { "id": "338840", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Backport to 1_6_X : https://github.com/appcelerator/alloy/pull/655", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2015-01-13T06:29:07.000+0000", "updated": "2015-01-13T06:29:07.000+0000" }, { "id": "338869", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Note to testers: you should be able to build any/all of the test apps that use models/collections without change or errors", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-01-13T14:38:39.000+0000", "updated": "2015-01-13T14:38:39.000+0000" }, { "id": "343122", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "App that demonstrates the use of promises attached.\r\n\r\nThe key is the doClick() function in the index.js controller. You'll see that it's fetching from the collection, which now has a new property of {{promise}} which contains a promise object. That object's then() method is used to display data when the JSON data source finally returns the data.\r\n\r\nIf you look to the lib/alloy/sync/customAdapter.js file, you'll see that we're creating and returning a promise.\r\n\r\nPerhaps the adapter could be rewritten without the superagent library. But since it is designed to work with promises, it was easiest to adapt Aaron's sample app code keeping superagent in there.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-12T20:46:47.000+0000", "updated": "2015-02-12T20:46:47.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }