{ "id": "138117", "key": "AC-3162", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-07-04T00:27:20.000+0000", "created": "2014-10-15T22:23:54.000+0000", "labels": [ "TCSupportTriage", "feature" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:57:33.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": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." } ], "description": "Get inspired by Node.js which uses index.js to serve sharing across files inside the directory. See attached screenshot where shared stuff defined in index.js will be available to all three files in the red square.\r\n\r\nThis would be helpful if I have multiple helper functions to require in any file inside a specific directory but they should not be in the Alloy.Globals.\r\n\r\n", "attachment": [ { "id": "51990", "filename": "D2EAF685-A15F-4AFF-BE0B-4BC3E69CC017.png", "author": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-15T22:23:54.000+0000", "size": 52530, "mimeType": "image/png" } ], "flagged": false, "summary": "Offer the way to share common utilities and helper functions across all files inside that directory", "creator": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Alloy 1.5.1\r\niOS 7.1\r\nTi Mob SDK 3.3.0\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n", "comment": { "comments": [ { "id": "328392", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello!\r\n\r\nYou can add this kind of objects inside the lib directory. Then you can do a require from any place: \r\n\r\nhttp://docs.appcelerator.com/titanium/3.0/#!/guide/Alloy_Controllers\r\n\r\nPlease let me know if that works for you.\r\n\r\nBest Regards,\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-10-16T23:37:28.000+0000", "updated": "2014-10-16T23:37:28.000+0000" }, { "id": "330066", "author": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Mauro\r\n\r\nI know I can achieve this via that way. But, I just think it would be better to share common files using my way.\r\n\r\nAnyway, I will see how your recommendation goes.\r\n\r\nThanks\r\n\r\nYou can now close this ticket.\r\n", "updateAuthor": { "name": "jialhe85@gmail.com", "key": "jialhe85@gmail.com", "displayName": "David He", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-30T11:57:13.000+0000", "updated": "2014-10-30T11:57:13.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }