{"action":"created","comment":{"url":"https://api.github.com/repos/piwik/piwik/pulls/comments/138494133","pull_request_review_id":62297110,"id":138494133,"diff_hunk":"@@ -126,9 +165,29 @@ private function buildWrappedSelectQuery($select, $from, $where, $groupBy, $orde\n             $innerGroupBy = false;\n         }\n \n+        if (!isset($innerGroupBy) && in_array('log_visit', $matchesFrom[1])) {\n+            $innerGroupBy = \"log_visit.idvisit\";\n+        } elseif (!isset($innerGroupBy)) {\n+            throw new Exception('Cannot use subselect for join as no group by rule is specified');\n+        }\n+\n+        if (!empty($toBeReplaced)) {","path":"core/DataAccess/LogQueryBuilder.php","position":115,"original_position":115,"commit_id":"11765b80571f8255be0fc0993f6f2786e94e6a51","original_commit_id":"11765b80571f8255be0fc0993f6f2786e94e6a51","user":{"login":"tsteur","id":273120,"avatar_url":"https://avatars3.githubusercontent.com/u/273120?v=4","gravatar_id":"","url":"https://api.github.com/users/tsteur","html_url":"https://github.com/tsteur","followers_url":"https://api.github.com/users/tsteur/followers","following_url":"https://api.github.com/users/tsteur/following{/other_user}","gists_url":"https://api.github.com/users/tsteur/gists{/gist_id}","starred_url":"https://api.github.com/users/tsteur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsteur/subscriptions","organizations_url":"https://api.github.com/users/tsteur/orgs","repos_url":"https://api.github.com/users/tsteur/repos","events_url":"https://api.github.com/users/tsteur/events{/privacy}","received_events_url":"https://api.github.com/users/tsteur/received_events","type":"User","site_admin":false},"body":"related to above fix when selecting eg twice the `name` column... we then need to make sure to also change orderBy, groupBy etc.","created_at":"2017-09-12T23:42:06Z","updated_at":"2017-09-12T23:42:06Z","html_url":"https://github.com/piwik/piwik/pull/12040#discussion_r138494133","pull_request_url":"https://api.github.com/repos/piwik/piwik/pulls/12040","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments/138494133"},"html":{"href":"https://github.com/piwik/piwik/pull/12040#discussion_r138494133"},"pull_request":{"href":"https://api.github.com/repos/piwik/piwik/pulls/12040"}}},"pull_request":{"url":"https://api.github.com/repos/piwik/piwik/pulls/12040","id":140699322,"html_url":"https://github.com/piwik/piwik/pull/12040","diff_url":"https://github.com/piwik/piwik/pull/12040.diff","patch_url":"https://github.com/piwik/piwik/pull/12040.patch","issue_url":"https://api.github.com/repos/piwik/piwik/issues/12040","number":12040,"state":"open","locked":false,"title":"Better segment editor and fixes","user":{"login":"tsteur","id":273120,"avatar_url":"https://avatars3.githubusercontent.com/u/273120?v=4","gravatar_id":"","url":"https://api.github.com/users/tsteur","html_url":"https://github.com/tsteur","followers_url":"https://api.github.com/users/tsteur/followers","following_url":"https://api.github.com/users/tsteur/following{/other_user}","gists_url":"https://api.github.com/users/tsteur/gists{/gist_id}","starred_url":"https://api.github.com/users/tsteur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsteur/subscriptions","organizations_url":"https://api.github.com/users/tsteur/orgs","repos_url":"https://api.github.com/users/tsteur/repos","events_url":"https://api.github.com/users/tsteur/events{/privacy}","received_events_url":"https://api.github.com/users/tsteur/received_events","type":"User","site_admin":false},"body":"* Updated segment editor that takes less space now and works fine on mobile\r\n* Segment editor can now show descriptions for each segment (currently shows accept values, needs to be tweaked later all the accept values descriptions or have separate description)\r\n* Segment selector can now be easily embedded anywhere in the UI by using `<div piwik-segment-generator>`\r\n* New segments: `actionServerHour`, `actionServerMinute`, `visitServerMinute`, `visitLocalMinute`\r\n* Various fixes in Log Query Builder \r\n* Easier way to add a segment... all one has to do in a dimension is to specify the segmentName `protected $segmentName = 'myConversionSegmentName';`.... optionally it is possible to specify a sql segment `protected $sqlSegment = 'MINUTE(log_link_visit_action.server_time)';` and `protected $acceptValues = '0, 1, 2, 3, ..., 56, 57, 58, 59';` \r\n* More consistency\r\n * Eg segments now use also Visitors category instead of Visit to be consistent with everything else\r\n * Fixed some wording eg we showed report \"Page titles\" but the dimension label said \"Page name\" instead of \"Page title\"\r\n* Dimensions can now describe themselves much better... eg they can define \r\n * What kind of value they hold (URL, Money, Time, Number, Float, ...)\r\n * Whether the actual value for that dimension is behind a join\r\n * Whether there is a database discriminator meaning only when eg `log_action.type=1` then it is a page url\r\n * We can use this later to improve auto suggestion for segment editor, and automatically format dimensions that are referenced in a report (will ensure consistency re formatting) etc\r\n * See eg https://github.com/piwik/piwik/blob/dimensions/plugins/Actions/Columns/PageUrl.php#L24-L37 \r\n* Dimensions can now create metrics that are generated based on those dimensions. This will allow us to generate better documentation for glossary etc\r\n* Plugins can now define their own \"entityNames\" eg \"idExperiment\" so plugins can make use of more core features like Row evolution etc.\r\n* ...\r\n\r\nRe developer changelog: There is no breaking API change but we have new ways to define a segment. Can add this to the docs or we do it with Piwik 4.\r\n\r\nRelated PRs:\r\n* https://github.com/piwik/plugin-CustomDimensions/pull/69\r\n* https://github.com/piwik/developer-documentation/pull/193","created_at":"2017-09-12T22:44:28Z","updated_at":"2017-09-12T23:42:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8afae5bb6fd15f094af2175ac52ca13349247082","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/piwik/piwik/pulls/12040/commits","review_comments_url":"https://api.github.com/repos/piwik/piwik/pulls/12040/comments","review_comment_url":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/12040/comments","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/11765b80571f8255be0fc0993f6f2786e94e6a51","head":{"label":"piwik:dimensions","ref":"dimensions","sha":"11765b80571f8255be0fc0993f6f2786e94e6a51","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik 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/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","deployments_url":"https://api.github.com/repos/piwik/piwik/deployments","created_at":"2011-03-30T21:18:17Z","updated_at":"2017-09-12T20:21:03Z","pushed_at":"2017-09-12T22:45:25Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"https://piwik.org/","size":180197,"stargazers_count":7944,"watchers_count":7944,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1437,"mirror_url":null,"open_issues_count":1490,"forks":1437,"open_issues":1490,"watchers":7944,"default_branch":"3.x-dev"}},"base":{"label":"piwik:3.x-dev","ref":"3.x-dev","sha":"3cb7169cef259efe922912364c3c8479a986619c","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars1.githubusercontent.com/u/698038?v=4","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik 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/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","deployments_url":"https://api.github.com/repos/piwik/piwik/deployments","created_at":"2011-03-30T21:18:17Z","updated_at":"2017-09-12T20:21:03Z","pushed_at":"2017-09-12T22:45:25Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"https://piwik.org/","size":180197,"stargazers_count":7944,"watchers_count":7944,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1437,"mirror_url":null,"open_issues_count":1490,"forks":1437,"open_issues":1490,"watchers":7944,"default_branch":"3.x-dev"}},"_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/12040"},"html":{"href":"https://github.com/piwik/piwik/pull/12040"},"issue":{"href":"https://api.github.com/repos/piwik/piwik/issues/12040"},"comments":{"href":"https://api.github.com/repos/piwik/piwik/issues/12040/comments"},"review_comments":{"href":"https://api.github.com/repos/piwik/piwik/pulls/12040/comments"},"review_comment":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/piwik/piwik/pulls/12040/commits"},"statuses":{"href":"https://api.github.com/repos/piwik/piwik/statuses/11765b80571f8255be0fc0993f6f2786e94e6a51"}},"author_association":"OWNER"}}
{"actor":{"display_login":"tsteur"}}