{ "id": "85246", "key": "TIMOB-9669", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-07-12T16:16:11.000+0000", "created": "2012-01-20T11:59:28.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [ { "id": "18745", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94486", "key": "TIMOB-9893", "fields": { "summary": "TiAPI: CommonJS 1.1 compliance", "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": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:53:15.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": "h1. Feature\r\nSupport requiring based on relative paths:\r\n- From sub contexts (a tab window with the url property set).\r\n- As a result of Ti.include.\r\n- From inside another require'd CommonJS module.\r\n\r\nh2. Platform Disparity\r\nRequire on Android deals with relative paths, just as described in https://wiki.appcelerator.org/display/guides/CommonJS+Modules+in+Titanium#CommonJSModulesinTitanium-JavaScriptModulePathResolution. On iOS however, all Required files are searched for in the applications root.\r\n\r\nh2. Reproduction\r\nAttached are several projects. The easiest to reproduce and quickest to grasp is \"RelativePathingReducedReproduction.zip\". Drop it in an app and run it. If you see any errors, then this isn't implemented yet. Otherwise, you should see three distinct Ti.API.info messages appear for each of the executed JavaScript files.", "attachment": [ { "id": "27510", "filename": "CommonJsTest.zip", "author": { "name": "quinnmah@yahoo.com", "key": "quinnmah@yahoo.com", "displayName": "Quinn Mah", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-02T19:57:10.000+0000", "size": 2941139, "mimeType": "application/zip" }, { "id": "28551", "filename": "RelativePathingReducedReproduction.zip", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-06-20T12:58:56.000+0000", "size": 3085, "mimeType": "application/zip" }, { "id": "25230", "filename": "Resources.zip", "author": { "name": "mark.ruys@in2sports.net", "key": "mark.ruys@in2sports.net", "displayName": "Mark Ruys", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-01-20T11:59:28.000+0000", "size": 2312312, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Relative Pathing of Require'd CommonJS Modules", "creator": { "name": "mark.ruys@in2sports.net", "key": "mark.ruys@in2sports.net", "displayName": "Mark Ruys", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "mark.ruys@in2sports.net", "key": "mark.ruys@in2sports.net", "displayName": "Mark Ruys", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Tested in iOS Simulator 5.1\r\nNOT IMPLEMENTED with Ti SDK 2.1.0, timestamp=06/19/12 19:02, githash=da36a08\r\nNOT IMPLEMENTED with Ti SDK 2.0.3, timestamp=06/01/12 14:15, githash=a43004b", "comment": { "comments": [ { "id": "183857", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-02-21T14:40:06.000+0000", "updated": "2012-02-21T14:40:06.000+0000" }, { "id": "183862", "author": { "name": "mark.ruys@in2sports.net", "key": "mark.ruys@in2sports.net", "displayName": "Mark Ruys", "active": true, "timeZone": "Europe/Berlin" }, "body": "How can this be a duplicate of TIMOB-6689, a ticket which is closed because it is not reproducable. I provided code to reproduce the bug I encountered. Apparently you haven't take the effort to run my example. So what's the point of submitting bug reports if you close them unseen? Rather frustrating...", "updateAuthor": { "name": "mark.ruys@in2sports.net", "key": "mark.ruys@in2sports.net", "displayName": "Mark Ruys", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-02-21T14:49:06.000+0000", "updated": "2012-02-21T14:49:06.000+0000" }, { "id": "193531", "author": { "name": "quinnmah@yahoo.com", "key": "quinnmah@yahoo.com", "displayName": "Quinn Mah", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm pretty sure this is not fixed in 1.8.2 or 2.0.1GA. I also tried it as per the example in https://wiki.appcelerator.org/display/guides/CommonJS+Modules+in+Titanium#CommonJSModulesinTitanium-JavaScriptModulePathResolution. The CommonJS spec also says that the relative path is from the file that makes the \"require\" call and only absolute paths work where Resources is the root directory. I also confirmed it by running the same example through nodeJS as I'm trying to write re-usable javascript supported by both platforms. It would be great if someone could fix this in appcelerator. I've also zipped up the test case for someone to verify.", "updateAuthor": { "name": "quinnmah@yahoo.com", "key": "quinnmah@yahoo.com", "displayName": "Quinn Mah", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-02T19:51:19.000+0000", "updated": "2012-05-02T19:55:04.000+0000" }, { "id": "193532", "author": { "name": "quinnmah@yahoo.com", "key": "quinnmah@yahoo.com", "displayName": "Quinn Mah", "active": true, "timeZone": "America/Los_Angeles" }, "body": "See attachment CommonJSTest.zip of relative path example to show that it's broken in 1.8.2 and 2.0.1GA and doesn't conform to the CommonJS spec:\r\n\r\nhttps://wiki.appcelerator.org/display/guides/CommonJS+Modules+in+Titanium#CommonJSModulesinTitanium-JavaScriptModulePathResolution", "updateAuthor": { "name": "quinnmah@yahoo.com", "key": "quinnmah@yahoo.com", "displayName": "Quinn Mah", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-02T19:57:10.000+0000", "updated": "2012-05-02T19:58:22.000+0000" }, { "id": "199397", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "I have reproduced this with 2.1.0 and 2.0.3 builds. Please take another look.\r\n\r\nAlso, if [TIMOB-6689] is not reproducible, but this is, then we have a different issue here, not a duplicate. Or we have a different test case that would merit [TIMOB-6689] being reopened.\r\n\r\nBROKEN with Ti SDK 2.1.0, timestamp=06/19/12 19:02, githash=da36a08\r\nBROKEN with Ti SDK 2.0.3, timestamp=06/01/12 14:15, githash=a43004b", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-06-20T13:00:35.000+0000", "updated": "2012-06-20T13:01:20.000+0000" }, { "id": "199439", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This should be fixed by TIMOB-9524. See pull request [2414|https://github.com/appcelerator/titanium_mobile/pull/2414].", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-20T15:16:01.000+0000", "updated": "2012-06-20T15:16:01.000+0000" }, { "id": "203054", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Violates CommonJS 1.1 spec:\r\n\r\nhttp://wiki.commonjs.org/wiki/Modules/1.1\r\n\r\nThis is an issue which will be fixed on Android, not on other platforms (which behave correctly).", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-12T16:16:11.000+0000", "updated": "2012-07-12T16:16:11.000+0000" }, { "id": "415056", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:53:15.000+0000", "updated": "2017-03-22T21:53:15.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }