{ "id": "131264", "key": "TIMOB-17077", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-05T17:42:57.000+0000", "created": "2014-06-04T22:51:39.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "analytics", "qe-3.3.0", "qe-testadded", "regression" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "38107", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "115813", "key": "TIMOB-14186", "fields": { "summary": "BlackBerry: Can't see install events on the dashboard", "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 } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-25T17:53:16.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "Testing Analytics, we encountered that \"ti.enroll\" event is not being sent.\r\nAs a result, we do not see BB installs on a dashboard.\r\nIt is a regression.\r\nPlease, compare attachments.\r\n\r\nTested the following code\r\n{code}\r\nvar apm = undefined;\r\ntry { apm = require(\"com.appcelerator.apm\"); }\r\ncatch (e) { Ti.API.info(\"com.appcelerator.apm module is not available\"); }\r\napm && apm.init();\r\n\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\nvar startDate = new Date();\r\nif (Ti.UI.Android){win.windowSoftInputMode = Ti.UI.Android.SOFT_INPUT_ADJUST_PAN;}\r\n\r\nfunction timeOut(){setTimeout(function(){if(Ti.Platform.osname == 'ios' || 'android'){label.text = Ti.Analytics.lastEvent;}},1000);}\r\n\r\nfunction createRow(i) {\r\n var row = Ti.UI.createView({backgroundColor: 'white', width:'100%', height: '10%', top: 5, left: 0});\r\n return row;\r\n}\r\n\r\nvar column1 = Ti.UI.createView({top: 0, left: 0, layout: 'vertical', height:\"60%\", width:'33%'});\r\nvar column2 = Ti.UI.createView({top: 0, layout: 'vertical', height:\"60%\", width:'33%'});\r\nvar column3 = Ti.UI.createView({top: 0, right: 0, layout: 'vertical', height:\"60%\", width:'33%'});\r\nif(Ti.Platform.osname == 'android'){\r\n\tvar label = Ti.UI.createLabel({backgroundColor:'#FFF', color:'black', textAlign: 'center', bottom:0, width: '98%', height:'40%'});}\r\nelse{\r\n\tvar label = Ti.UI.createLabel({backgroundColor:'#FFF', color:'black', font: {fontSize: 11}, textAlign: 'center', bottom:0, width: '98%', height:'40%'});}\r\nvar border = Ti.UI.createLabel({top:0, height:'1', borderColor:'#EEE', width: Titanium.UI.FILL});\r\nvar deprecated = Ti.UI.createLabel({backgroundColor:'#FFF', color:'red', textAlign: 'center', bottom:0, width: Titanium.UI.FILL});\r\n\r\n//Testing the Ti.Analytics.addEvent\r\nvar testOneButton = Ti.UI.createButton({title: \"addEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestOneButton.addEventListener('click', function(e){\r\n\tTi.Analytics.addEvent('addEventOne', 'addEventTwo', 'addEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Add Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.getLastEvent\r\nvar testTwoButton = Ti.UI.createButton({title: \"getLastEvent\", height: '33%', width: '100%', top: 0});\r\ntestTwoButton.addEventListener('click', function(e){\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Get Last Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.getBubbleParent\r\nvar testThreeButton = Ti.UI.createButton({title: \"getBubble\", height: '33%', width: '100%', top: 0});\r\ntestThreeButton.addEventListener('click', function(e){\r\n\tTi.Analytics.getBubbleParent();\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Get Bubble Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.featureEvent\r\nvar testFourButton = Ti.UI.createButton({title: \"featureEvent\", height: '33%', width: '100%', top: 0});\r\ntestFourButton.addEventListener('click', function(e){\r\n\tTi.Analytics.featureEvent('featureEvent', {\"value1\":\"key1\"});\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Feature Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.navEvent\r\nvar testFiveButton = Ti.UI.createButton({title: \"navEvent\", height: '33%', width: '100%', top: 0});\r\ntestFiveButton.addEventListener('click', function(e){\r\n\tTi.Analytics.navEvent('navEventOne', 'navEventTwo', 'navEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Navigation Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.timedEvent\r\nvar testSixButton = Ti.UI.createButton({title: \"timedEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestSixButton.addEventListener('click', function(e){\r\n\tvar stopDate = new Date();\r\n\tvar duration = stopDate - startDate;\r\n\tTi.Analytics.timedEvent('timedEvent.testButton', startDate, stopDate, duration);\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Timed Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.settingsEvent\r\nvar testSevenButton = Ti.UI.createButton({title: \"settingsEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestSevenButton.addEventListener('click', function(e){\r\n\tTi.Analytics.settingsEvent('settingsEvent', 'settingsEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Settings Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.userEvent\r\nvar testEightButton = Ti.UI.createButton({title: \"userEvent\", height: '33%', color:'red', width: '100%', top: 0});\r\ntestEightButton.addEventListener('click', function(e){\r\n\tTi.Analytics.userEvent('userEvent', 'userEvent.testButton');\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"User Event\"; }\r\n\tdeprecated.setText(\"Deprecated 2.0.0\");\r\n\twin.add(deprecated);\r\n});\r\n\r\n//Testing the Ti.Analytics.setBubbleParent\r\nvar testNineButton = Ti.UI.createButton({title: \"setBubble\", height: '33%', width: '100%', top: 0});\r\ntestNineButton.addEventListener('click', function(e){\r\n\tTi.Analytics.setBubbleParent(true);\r\n\tif(Ti.Platform.osname != 'mobileweb'){ timeOut(); } else { label.text = \"Set Event\"; }\r\n\twin.remove(deprecated);\r\n});\r\n\r\ncolumn1.add(testOneButton);\r\ncolumn1.add(testTwoButton);\r\nif(Ti.Platform.osname != 'mobileweb'){\r\n\tcolumn1.add(testThreeButton);\r\n}\r\n\r\ncolumn2.add(testFourButton);\r\ncolumn2.add(testFiveButton);\r\ncolumn2.add(testSixButton);\r\n\r\ncolumn3.add(testSevenButton);\r\ncolumn3.add(testEightButton);\r\nif(Ti.Platform.osname != 'mobileweb'){\r\n\tcolumn3.add(testNineButton);\r\n}\r\nif(Ti.Platform.osname != 'mobileweb'){ label.text = Ti.Analytics.lastEvent; }\r\nlabel.add(border);\r\nwin.add(column1);\r\nwin.add(column2);\r\nwin.add(column3);\r\nwin.add(label);\r\nwin.open();\r\n\r\n{code}", "attachment": [ { "id": "48620", "filename": "3.3.0_bb_analytics.txt", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-04T22:51:39.000+0000", "size": 604, "mimeType": "text/plain" }, { "id": "48619", "filename": "bb_payload.txt", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-04T22:51:39.000+0000", "size": 1728, "mimeType": "text/plain" }, { "id": "48770", "filename": "Screen Shot 2014-06-09 at 2.13.12 PM.png", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-09T21:16:38.000+0000", "size": 15798, "mimeType": "image/png" } ], "flagged": false, "summary": "BlackBerry: Analytics - ti.enroll event is not sent to the payload", "creator": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac osx 10.9.3 Mavericks\r\nAppcelerator Studio, build: 3.3.0.201405271647\r\nTitanium SDK, build: 3.3.0.v20140603152512 \r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-beta \r\nnpm@1.3.2 \r\ntitanium@3.3.0-beta2 \r\ntitanium-code-processor@1.1.1\r\nDevice: BB Z10 (10.2.1)", "closedSprints": [ { "id": 105, "state": "closed", "name": "2014 Sprint 11 SDK", "startDate": "2014-05-27T21:43:32.338Z", "endDate": "2014-06-07T00:00:00.000Z", "completeDate": "2014-06-09T21:36:37.587Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "307649", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I've looking at the code and the payload and this is what's going on.\r\nWhen the app is starts up it looks for the analytics database file. If that file is not found, then it creates it and sends the \"ti.enroll\" event - this means that this is the first time the app runs after being installed.\r\nThe problem is that when the app is uninstalled, the data that was saved does not get deleted and persists even if the app is not longer on the device. So when you install the app a second time, the analytics database exists from the previous install, and therefore the \"ti.enroll\" event is not sent when it should have been.\r\nThe \"workaround\" would be to create a new app every time, or at least change the app id before running it and testing.\r\n\r\nI'll leave this ticket open for discussion and suggestions on how to accomplish this better.\r\n", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-05T11:07:46.000+0000", "updated": "2014-06-05T11:07:46.000+0000" }, { "id": "307663", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~penrique] I tested 5 applications with different guid before filing this ticket.\r\nReady to discuss :)", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-05T16:21:32.000+0000", "updated": "2014-06-05T16:21:32.000+0000" }, { "id": "307666", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I think I found the issue, it's something else. Working on it at the moment. Details to come", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-05T17:01:14.000+0000", "updated": "2014-06-05T17:01:14.000+0000" }, { "id": "307685", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/260", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-06-05T17:36:44.000+0000", "updated": "2014-06-05T17:36:44.000+0000" }, { "id": "307761", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with\r\nAppcelerator Studio, build: 3.3.0.201405271647\r\nTitanium SDK, build: 3.3.0.v20140605150555\r\n\r\nh5.Actual result\r\nti.enroll event sent to the payload\r\n{code}\r\naguid\":\"050b2e34-43da-4b6b-a28c-a47f2df55999\",\"type\":\"ti.enroll\",\"event\":\"ti.enroll\r\n{code}", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-05T23:21:06.000+0000", "updated": "2014-06-05T23:21:06.000+0000" }, { "id": "308103", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and verified fixed:\r\nMac osx 10.9.3 Mavericks\r\nAppcelerator Studio, build: 3.3.0.201406061445\r\nTitanium SDK, build: 3.3.0.v20140606154912 \r\nNode.JS Version: v0.10.13 \r\nNPM Version: 1.3.2 \r\nacs@1.0.14 \r\nalloy@1.4.0-beta \r\nnpm@1.3.2 \r\ntitanium@3.3.0-beta2 \r\ntitanium-code-processor@1.1.1\r\nDevice: BB Z10 (10.2.1)\r\n\r\ndashboard.appcelerator.com\r\n(please see screenshot)", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-09T21:15:54.000+0000", "updated": "2014-06-09T21:15:54.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }