{ "id": "88167", "key": "TIMOB-8082", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-01-28T23:44:30.000+0000", "created": "2012-03-19T12:41:05.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-closed-3.2.2" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "15849", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "82370", "key": "TIMOB-6033", "fields": { "summary": "Android: Heavyweight root window causes incorrect CommonJS global variable behavior", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-11T07:21:41.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Globals can be brought in to the module's scope on iOS. Please see the following code.\r\n\r\n*SAMPLE CODE*\r\n{noformat}\r\napp.js\r\n================================\r\nvar App = {};\r\nvar myModule = require('myModule');\r\nnew myModule();\r\n\r\nmyModule.js\r\n================================\r\nApp.MyModule = function() {\r\n return Ti.UI.createWindow({backgroundColor:'red'}).open();\r\n};\r\nmodule.exports = App.MyModule;\r\n{noformat}\r\n\r\n*STEPS TO REPRODUCE*\r\n1. Create a Titanium Mobile project and copy the following code into app.js and myModule.js\r\n2. Run the project and a blank window with red background color will be seen\r\n\r\n*OBSERVED BEHAVIOR*\r\n1. Window with red background color is seen.\r\n\r\n*EXPECTED BEHAVIOR*\r\n1. A runtime error indicating the use of global object.\r\n\r\n*OTHER OBSERVATIONS*\r\n1. On Android, a runtime error is noticed with the message \"Uncaught ReferenceError: App is not defined\"\r\n", "attachment": [], "flagged": false, "summary": "iOS: Global variables are accessible in CommonJS module's scope", "creator": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Product: Titanium Mobile\r\nTitanium SDK: 1.8.2, 2.0.0 CI\r\nHost OS: Mac OS X Lion\r\nPlatform OS: iOS\r\nPlatform OS Version: 5.0", "comment": { "comments": [ { "id": "187334", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-03-20T05:25:17.000+0000", "updated": "2012-03-20T05:25:17.000+0000" }, { "id": "248324", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-19T09:15:51.000+0000", "updated": "2013-04-19T09:15:51.000+0000" }, { "id": "296533", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified the fix, hence closing the issue.\r\n\r\nEnvironment used:\r\nDevice : iPod touch 2 , iOS version: 7.1\r\nSDK: 3.2.3.v20140310185916\r\nCLI version : 3.2.1\r\nOS : MAC OSX 10.9\r\nAlloy: 1.3.1\r\nACS: 1.0.14\r\nnpm:1.3.2\r\nAppcelerator Studio, build: 3.2.2.201403061827\r\ntitanium-code-processor: 1.1.0\r\nXCode : 5.1 Beta 5\r\n", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-03-11T07:21:29.000+0000", "updated": "2014-03-11T07:21:29.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }