{ "id": "86664", "key": "TIMOB-7711", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": "12096", "description": "", "name": "Sprint 2012-04", "archived": true, "released": true, "releaseDate": "2012-02-26" }, { "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": "2012-02-17T15:11:50.000+0000", "created": "2012-02-17T12:27:26.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [ { "id": "15267", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "86662", "key": "TIMOB-7709", "fields": { "summary": "Android: Expose analytics Boolean Property on Ti.App", "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 } } } }, { "id": "15268", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "86663", "key": "TIMOB-7710", "fields": { "summary": "iOS: Expose analytics Boolean Property on Ti.App", "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": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-09T01:05:22.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "h1. Task\r\nExpose \"analytics\" property on Ti.App so that developers can detect if analytics are enabled or not in the tiapp.xml.\r\n\r\nh2. Test\r\nSee if the below reflects what is in your tiapp.xml:\r\n{code:title=app.js}\r\nalert('Enabled? ' + (Ti.App.analytics ? 'Yes!' : 'No'));\r\n{code}", "attachment": [], "flagged": false, "summary": "Mobile Web: Expose analytics Boolean Property on Ti.App", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "183655", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "I think this can be accomplished entirely by changing lines 11-12 of mobileweb/src/config.js to the following:\r\n{code:title=config.js}\r\nversion: \"${app_version | jsQuoteEscapeFilter}\",\r\nanalytics: ${app_analytics | jsQuoteEscapeFilter}\r\n{code}", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-02-17T12:30:23.000+0000", "updated": "2012-02-17T12:30:23.000+0000" }, { "id": "183660", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "PR sent: https://github.com/appcelerator/titanium_mobile/pull/1463\r\nVerified to work with functional test.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-02-17T12:45:48.000+0000", "updated": "2012-02-17T12:45:48.000+0000" }, { "id": "183661", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Workaround for this issue on Mobile Web:\r\n{code:title=app.js}\r\nvar cfg = require.config,\r\n analyticsEnabled = cfg.analytics;\r\n{code}\r\nThis doesn't offer platform parity, though.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-02-17T12:55:45.000+0000", "updated": "2012-02-17T12:55:45.000+0000" }, { "id": "183663", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "There is no Ti.App.analytics property according to the API docs (http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.App-module), Android source, and iPhone source.\r\n\r\nFurthermore, adding the \"analtyics\" setting to the config twice is redundant and not acceptable.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-02-17T13:32:57.000+0000", "updated": "2012-02-17T13:32:57.000+0000" }, { "id": "183665", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Of course it's not in the docs, it doesn't exist yet. That's why this ticket was created, and that's why it was created for Android and iOS and APIDocs as well (see linked tickets).\r\n\r\nThis is necessary for us to detect if analytics is enabled or not.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-02-17T13:44:50.000+0000", "updated": "2012-02-17T13:44:50.000+0000" }, { "id": "183690", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "OK, understood. I still stand think your solution in your pull request could be improved before being accepted. Namely, there's no point in having the \"analytics\" config option defined twice. Just keep the one in the \"app\" section and update line 10 of Ti/_/analytics with the correct \"analyticsEnabled = cfg.app.analytics\".", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-02-17T14:55:24.000+0000", "updated": "2012-02-17T14:55:24.000+0000" }, { "id": "183692", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Agreed. Check out the PR, it's been updated with those changes.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-02-17T14:57:16.000+0000", "updated": "2012-02-17T14:57:16.000+0000" }, { "id": "183698", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Looks good!", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-02-17T15:11:50.000+0000", "updated": "2012-02-17T15:11:50.000+0000" }, { "id": "410190", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T01:05:22.000+0000", "updated": "2017-03-09T01:05:22.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }