{ "id": "83914", "key": "TIMOB-6688", "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": "12090", "description": "", "name": "Sprint 2011-50", "archived": true, "released": true, "releaseDate": "2011-12-19" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-12-20T15:08:57.000+0000", "created": "2011-12-15T05:35:36.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "dr-list", "parity" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "14263", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "83917", "key": "TIMOB-6689", "fields": { "summary": "iOS: CommonJS - relative path in require() causes nested include() statements to fail", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14267", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "63024", "key": "TIMOB-2392", "fields": { "summary": "iOS: Drillbit regression: kroll.js", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "14266", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "67450", "key": "TIMOB-4326", "fields": { "summary": "iOS: Inconsistent Object Access on Windows", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-04T22:02:19.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": "h2. Expected Results\r\n\r\nA variable is set in a module, this module is then included in other modules. It is updated by one module for use in the other.\r\n\r\nThe values are updated.\r\n\r\nNote that Android V8 and Rhino works as expected\r\n\r\nh2. Actual Results\r\n\r\nThe variable is not updated, and thus remains null on iOS\r\n\r\nh2. Code\r\n{code:lang=javascript|title=app.js}\r\nvar FSUT\t=\t{};\r\n\r\nFSUT.GV\t\t=\trequire('FSUT-GV');\r\nFSUT.CO \t=\trequire('FSUT-CO');\r\n\r\nFSUT.CO.showValues();\r\n\r\nFSUT.CO.updateValues();\r\n\r\nFSUT.CO.showValues();\r\n{code}\r\n\r\n\r\n\r\n{code:lang=javascript|title=FSUT-GV.js}\r\nexports.VARS =\r\n{\r\n\tfieldA:\t\t\tnull,\r\n\tfieldB:\t\t\t\"123\"\r\n};\r\nexports.updateFields = function(inValue, inField)\r\n{\r\n\tthis.VARS[inField]\t=\tinValue;\r\n};\r\n{code}\r\n\r\n\r\n\r\n{code:lang=javascript|title=FSUT-CO.js}\r\n\r\nvar FSUT\t=\t{};\r\n FSUT.GV =\trequire('FSUT-GV');\r\n\r\nexports.showValues = function()\r\n{\r\n\talert(FSUT.GV.VARS.fieldA + \" .... \" + FSUT.GV.VARS.fieldB);\r\n};\r\nexports.updateValues = function()\r\n{\r\n\tFSUT.GV.updateFields('NEW VALUE', 'fieldA');\r\n};\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: CommonJS - Module variables not updated", "creator": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "thewarpedcoder", "key": "thewarpedcoder", "displayName": "Trevor Ward", "active": true, "timeZone": "Europe/London" }, "environment": "* Mac OSX Lion\r\n* Ti Studio 1.1.0.201112142248\r\n* Titanium 1.8.0.RC1, nightly builds 1.8.0 and 1.9.0 from 13th / 14th / 15th December 2011\r\n* IOS 5 xCode 4.3", "comment": { "comments": [ { "id": "176239", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue should be resolved concurrently with TIMOB-6689 - possibly not the same pull req, but it may be required.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-15T10:07:44.000+0000", "updated": "2011-12-15T10:07:44.000+0000" }, { "id": "176349", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed in simulator (5.0), iPhone 4s (5.0.1), iPod touch 3rd ten (4.0.2) with SDK 1.8.0.1-20111216011148. (appears as 1.8.0.1 due to CI issues being worked on)", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-16T10:37:49.000+0000", "updated": "2011-12-16T10:37:49.000+0000" }, { "id": "176518", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening issue; must be tagged for merge to 1.9.0. This is still resolved for 1.8.0.1 as indicated by QE.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-19T11:16:33.000+0000", "updated": "2011-12-19T11:16:33.000+0000" }, { "id": "178991", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing this issue as fixed against 1.8.0.1", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-11T16:25:30.000+0000", "updated": "2012-01-11T16:25:30.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }