{"action":"created","comment":{"url":"https://api.github.com/repos/matomo-org/matomo/pulls/comments/190069628","pull_request_review_id":122372581,"id":190069628,"diff_hunk":"@@ -547,8 +547,11 @@ protected function get($archiveNames, $archiveDataType, $idSubtable = null)\n             $dataNames, $archiveDataType, $this->params->getIdSites(), $this->params->getPeriods(), $defaultRow = null);\n \n         $archiveIds = $this->getArchiveIds($archiveNames);\n-\n         if (empty($archiveIds)) {\n+            /**\n+             * Triggered when no archive data is found in an API request.\n+             */\n+            Piwik::postEvent('Archive.noArchivedData');","path":"core/Archive.php","position":9,"original_position":9,"commit_id":"94fb3a8d9f774e58a0952b7d7dfac7b51799e417","original_commit_id":"94fb3a8d9f774e58a0952b7d7dfac7b51799e417","user":{"login":"diosmosis","id":125140,"avatar_url":"https://avatars1.githubusercontent.com/u/125140?v=4","gravatar_id":"","url":"https://api.github.com/users/diosmosis","html_url":"https://github.com/diosmosis","followers_url":"https://api.github.com/users/diosmosis/followers","following_url":"https://api.github.com/users/diosmosis/following{/other_user}","gists_url":"https://api.github.com/users/diosmosis/gists{/gist_id}","starred_url":"https://api.github.com/users/diosmosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diosmosis/subscriptions","organizations_url":"https://api.github.com/users/diosmosis/orgs","repos_url":"https://api.github.com/users/diosmosis/repos","events_url":"https://api.github.com/users/diosmosis/events{/privacy}","received_events_url":"https://api.github.com/users/diosmosis/received_events","type":"User","site_admin":false},"body":"Yes I originally had it in the Visualization, and it worked for one ticket, but not for the other one. I thought about doing it on Request.dispatch for API methods but that has odd edge cases as well (eg, we'd have to check if what we got is an empty datatable, but what about datatable\\maps? and what about plugins that return something else? or plugins that just do something that doesn't trigger archiving?).\r\n\r\nChecking for root API request that isn't in cron archiving sounds better to me. This would be in the event handler, correct? Or did you mean something else?","created_at":"2018-05-22T22:12:41Z","updated_at":"2018-05-22T22:12:42Z","html_url":"https://github.com/matomo-org/matomo/pull/12823#discussion_r190069628","pull_request_url":"https://api.github.com/repos/matomo-org/matomo/pulls/12823","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/matomo-org/matomo/pulls/comments/190069628"},"html":{"href":"https://github.com/matomo-org/matomo/pull/12823#discussion_r190069628"},"pull_request":{"href":"https://api.github.com/repos/matomo-org/matomo/pulls/12823"}},"in_reply_to_id":190061427},"pull_request":{"url":"https://api.github.com/repos/matomo-org/matomo/pulls/12823","id":186135809,"html_url":"https://github.com/matomo-org/matomo/pull/12823","diff_url":"https://github.com/matomo-org/matomo/pull/12823.diff","patch_url":"https://github.com/matomo-org/matomo/pull/12823.patch","issue_url":"https://api.github.com/repos/matomo-org/matomo/issues/12823","number":12823,"state":"open","locked":false,"title":"Add notification when report w/ segment has no data, but segment is unprocessed","user":{"login":"diosmosis","id":125140,"avatar_url":"https://avatars1.githubusercontent.com/u/125140?v=4","gravatar_id":"","url":"https://api.github.com/users/diosmosis","html_url":"https://github.com/diosmosis","followers_url":"https://api.github.com/users/diosmosis/followers","following_url":"https://api.github.com/users/diosmosis/following{/other_user}","gists_url":"https://api.github.com/users/diosmosis/gists{/gist_id}","starred_url":"https://api.github.com/users/diosmosis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diosmosis/subscriptions","organizations_url":"https://api.github.com/users/diosmosis/orgs","repos_url":"https://api.github.com/users/diosmosis/repos","events_url":"https://api.github.com/users/diosmosis/events{/privacy}","received_events_url":"https://api.github.com/users/diosmosis/received_events","type":"User","site_admin":false},"body":"**Note: this PR has API changes.**\r\n\r\n![image](https://user-images.githubusercontent.com/125140/39668206-12c2cbee-507c-11e8-8f01-8439a0981dd6.png)\r\n\r\nThis PR makes two changes to the way notifications are handled/displayed:\r\n\r\n* Transient notifications are now removed when the reporting page changes.\r\n* ViewDataTables have a view property called 'notifications' which can be used to add new notifications when loading a report. This is not in the Config so is not API. (The actual creation of notifications is done in the widget loader directive.)\r\n\r\nIndividual changes:\r\n\r\n* Remove 'notification_parser.js' and replace w/ `notification.service.js` angular service.\r\n* Add 'notifications' property to ViewDataTable's View & handle in _dataTable.twig. The widget loader directive initiates the \"parse\" of the divs outputted in _dataTable.twig. (Also done by widget loading logic in dashboard code.)\r\n* In reporting page controller, clear transient notifications after page load.\r\n* Added `getSegmentByDefinition()` function to SegmentEditor `Model`.\r\n* Add new event `Visualization.onLoadingError` that is triggered when there an exception is caught when loading report data.\r\n* Add new event `Archive.noArchivedData` that is triggered when during an API request no archive data can be found.\r\n* Use new event to display a notification when a report has no data and is for an unprocessed segment.\r\n\r\nFixes #12256 \r\nFixes #12255 ","created_at":"2018-05-05T02:49:51Z","updated_at":"2018-05-22T22:12:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f65d324d2fbde4a78032ce4afbc48e5966507b25","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":176285791,"url":"https://api.github.com/repos/matomo-org/matomo/labels/Needs%20Review","name":"Needs Review","color":"fad8c7","default":false},{"id":164789690,"url":"https://api.github.com/repos/matomo-org/matomo/labels/not-in-changelog","name":"not-in-changelog","color":"ffffff","default":false}],"milestone":{"url":"https://api.github.com/repos/matomo-org/matomo/milestones/117","html_url":"https://github.com/matomo-org/matomo/milestone/117","labels_url":"https://api.github.com/repos/matomo-org/matomo/milestones/117/labels","id":3328262,"number":117,"title":"3.5.1","description":"","creator":{"login":"mattab","id":466765,"avatar_url":"https://avatars3.githubusercontent.com/u/466765?v=4","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":41,"state":"open","created_at":"2018-05-08T02:53:00Z","updated_at":"2018-05-22T18:58:35Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/matomo-org/matomo/pulls/12823/commits","review_comments_url":"https://api.github.com/repos/matomo-org/matomo/pulls/12823/comments","review_comment_url":"https://api.github.com/repos/matomo-org/matomo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matomo-org/matomo/issues/12823/comments","statuses_url":"https://api.github.com/repos/matomo-org/matomo/statuses/94fb3a8d9f774e58a0952b7d7dfac7b51799e417","head":{"label":"matomo-org:12256-segment-preprocess-no-data","ref":"12256-segment-preprocess-no-data","sha":"94fb3a8d9f774e58a0952b7d7dfac7b51799e417","user":{"login":"matomo-org","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/matomo-org","html_url":"https://github.com/matomo-org","followers_url":"https://api.github.com/users/matomo-org/followers","following_url":"https://api.github.com/users/matomo-org/following{/other_user}","gists_url":"https://api.github.com/users/matomo-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matomo-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matomo-org/subscriptions","organizations_url":"https://api.github.com/users/matomo-org/orgs","repos_url":"https://api.github.com/users/matomo-org/repos","events_url":"https://api.github.com/users/matomo-org/events{/privacy}","received_events_url":"https://api.github.com/users/matomo-org/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"matomo","full_name":"matomo-org/matomo","owner":{"login":"matomo-org","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/matomo-org","html_url":"https://github.com/matomo-org","followers_url":"https://api.github.com/users/matomo-org/followers","following_url":"https://api.github.com/users/matomo-org/following{/other_user}","gists_url":"https://api.github.com/users/matomo-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matomo-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matomo-org/subscriptions","organizations_url":"https://api.github.com/users/matomo-org/orgs","repos_url":"https://api.github.com/users/matomo-org/repos","events_url":"https://api.github.com/users/matomo-org/events{/privacy}","received_events_url":"https://api.github.com/users/matomo-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matomo-org/matomo","description":"Liberating Web Analytics. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/matomo-org/matomo","forks_url":"https://api.github.com/repos/matomo-org/matomo/forks","keys_url":"https://api.github.com/repos/matomo-org/matomo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matomo-org/matomo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matomo-org/matomo/teams","hooks_url":"https://api.github.com/repos/matomo-org/matomo/hooks","issue_events_url":"https://api.github.com/repos/matomo-org/matomo/issues/events{/number}","events_url":"https://api.github.com/repos/matomo-org/matomo/events","assignees_url":"https://api.github.com/repos/matomo-org/matomo/assignees{/user}","branches_url":"https://api.github.com/repos/matomo-org/matomo/branches{/branch}","tags_url":"https://api.github.com/repos/matomo-org/matomo/tags","blobs_url":"https://api.github.com/repos/matomo-org/matomo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matomo-org/matomo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matomo-org/matomo/git/refs{/sha}","trees_url":"https://api.github.com/repos/matomo-org/matomo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matomo-org/matomo/statuses/{sha}","languages_url":"https://api.github.com/repos/matomo-org/matomo/languages","stargazers_url":"https://api.github.com/repos/matomo-org/matomo/stargazers","contributors_url":"https://api.github.com/repos/matomo-org/matomo/contributors","subscribers_url":"https://api.github.com/repos/matomo-org/matomo/subscribers","subscription_url":"https://api.github.com/repos/matomo-org/matomo/subscription","commits_url":"https://api.github.com/repos/matomo-org/matomo/commits{/sha}","git_commits_url":"https://api.github.com/repos/matomo-org/matomo/git/commits{/sha}","comments_url":"https://api.github.com/repos/matomo-org/matomo/comments{/number}","issue_comment_url":"https://api.github.com/repos/matomo-org/matomo/issues/comments{/number}","contents_url":"https://api.github.com/repos/matomo-org/matomo/contents/{+path}","compare_url":"https://api.github.com/repos/matomo-org/matomo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matomo-org/matomo/merges","archive_url":"https://api.github.com/repos/matomo-org/matomo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matomo-org/matomo/downloads","issues_url":"https://api.github.com/repos/matomo-org/matomo/issues{/number}","pulls_url":"https://api.github.com/repos/matomo-org/matomo/pulls{/number}","milestones_url":"https://api.github.com/repos/matomo-org/matomo/milestones{/number}","notifications_url":"https://api.github.com/repos/matomo-org/matomo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matomo-org/matomo/labels{/name}","releases_url":"https://api.github.com/repos/matomo-org/matomo/releases{/id}","deployments_url":"https://api.github.com/repos/matomo-org/matomo/deployments","created_at":"2011-03-30T21:18:17Z","updated_at":"2018-05-22T21:51:38Z","pushed_at":"2018-05-22T22:03:25Z","git_url":"git://github.com/matomo-org/matomo.git","ssh_url":"git@github.com:matomo-org/matomo.git","clone_url":"https://github.com/matomo-org/matomo.git","svn_url":"https://github.com/matomo-org/matomo","homepage":"https://matomo.org/","size":192977,"stargazers_count":9340,"watchers_count":9340,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1575,"mirror_url":null,"archived":false,"open_issues_count":1664,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1575,"open_issues":1664,"watchers":9340,"default_branch":"3.x-dev"}},"base":{"label":"matomo-org:3.x-dev","ref":"3.x-dev","sha":"634a7fe19efa7bc8a80ebad55f41025fe639ecfc","user":{"login":"matomo-org","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/matomo-org","html_url":"https://github.com/matomo-org","followers_url":"https://api.github.com/users/matomo-org/followers","following_url":"https://api.github.com/users/matomo-org/following{/other_user}","gists_url":"https://api.github.com/users/matomo-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matomo-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matomo-org/subscriptions","organizations_url":"https://api.github.com/users/matomo-org/orgs","repos_url":"https://api.github.com/users/matomo-org/repos","events_url":"https://api.github.com/users/matomo-org/events{/privacy}","received_events_url":"https://api.github.com/users/matomo-org/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"matomo","full_name":"matomo-org/matomo","owner":{"login":"matomo-org","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/matomo-org","html_url":"https://github.com/matomo-org","followers_url":"https://api.github.com/users/matomo-org/followers","following_url":"https://api.github.com/users/matomo-org/following{/other_user}","gists_url":"https://api.github.com/users/matomo-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matomo-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matomo-org/subscriptions","organizations_url":"https://api.github.com/users/matomo-org/orgs","repos_url":"https://api.github.com/users/matomo-org/repos","events_url":"https://api.github.com/users/matomo-org/events{/privacy}","received_events_url":"https://api.github.com/users/matomo-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matomo-org/matomo","description":"Liberating Web Analytics. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/matomo-org/matomo","forks_url":"https://api.github.com/repos/matomo-org/matomo/forks","keys_url":"https://api.github.com/repos/matomo-org/matomo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matomo-org/matomo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matomo-org/matomo/teams","hooks_url":"https://api.github.com/repos/matomo-org/matomo/hooks","issue_events_url":"https://api.github.com/repos/matomo-org/matomo/issues/events{/number}","events_url":"https://api.github.com/repos/matomo-org/matomo/events","assignees_url":"https://api.github.com/repos/matomo-org/matomo/assignees{/user}","branches_url":"https://api.github.com/repos/matomo-org/matomo/branches{/branch}","tags_url":"https://api.github.com/repos/matomo-org/matomo/tags","blobs_url":"https://api.github.com/repos/matomo-org/matomo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matomo-org/matomo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matomo-org/matomo/git/refs{/sha}","trees_url":"https://api.github.com/repos/matomo-org/matomo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matomo-org/matomo/statuses/{sha}","languages_url":"https://api.github.com/repos/matomo-org/matomo/languages","stargazers_url":"https://api.github.com/repos/matomo-org/matomo/stargazers","contributors_url":"https://api.github.com/repos/matomo-org/matomo/contributors","subscribers_url":"https://api.github.com/repos/matomo-org/matomo/subscribers","subscription_url":"https://api.github.com/repos/matomo-org/matomo/subscription","commits_url":"https://api.github.com/repos/matomo-org/matomo/commits{/sha}","git_commits_url":"https://api.github.com/repos/matomo-org/matomo/git/commits{/sha}","comments_url":"https://api.github.com/repos/matomo-org/matomo/comments{/number}","issue_comment_url":"https://api.github.com/repos/matomo-org/matomo/issues/comments{/number}","contents_url":"https://api.github.com/repos/matomo-org/matomo/contents/{+path}","compare_url":"https://api.github.com/repos/matomo-org/matomo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matomo-org/matomo/merges","archive_url":"https://api.github.com/repos/matomo-org/matomo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matomo-org/matomo/downloads","issues_url":"https://api.github.com/repos/matomo-org/matomo/issues{/number}","pulls_url":"https://api.github.com/repos/matomo-org/matomo/pulls{/number}","milestones_url":"https://api.github.com/repos/matomo-org/matomo/milestones{/number}","notifications_url":"https://api.github.com/repos/matomo-org/matomo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matomo-org/matomo/labels{/name}","releases_url":"https://api.github.com/repos/matomo-org/matomo/releases{/id}","deployments_url":"https://api.github.com/repos/matomo-org/matomo/deployments","created_at":"2011-03-30T21:18:17Z","updated_at":"2018-05-22T21:51:38Z","pushed_at":"2018-05-22T22:03:25Z","git_url":"git://github.com/matomo-org/matomo.git","ssh_url":"git@github.com:matomo-org/matomo.git","clone_url":"https://github.com/matomo-org/matomo.git","svn_url":"https://github.com/matomo-org/matomo","homepage":"https://matomo.org/","size":192977,"stargazers_count":9340,"watchers_count":9340,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1575,"mirror_url":null,"archived":false,"open_issues_count":1664,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1575,"open_issues":1664,"watchers":9340,"default_branch":"3.x-dev"}},"_links":{"self":{"href":"https://api.github.com/repos/matomo-org/matomo/pulls/12823"},"html":{"href":"https://github.com/matomo-org/matomo/pull/12823"},"issue":{"href":"https://api.github.com/repos/matomo-org/matomo/issues/12823"},"comments":{"href":"https://api.github.com/repos/matomo-org/matomo/issues/12823/comments"},"review_comments":{"href":"https://api.github.com/repos/matomo-org/matomo/pulls/12823/comments"},"review_comment":{"href":"https://api.github.com/repos/matomo-org/matomo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matomo-org/matomo/pulls/12823/commits"},"statuses":{"href":"https://api.github.com/repos/matomo-org/matomo/statuses/94fb3a8d9f774e58a0952b7d7dfac7b51799e417"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"diosmosis"}}