{"action":"created","comment":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/121727121","pull_request_review_id":43778105,"id":121727121,"diff_hunk":"@@ -350,6 +350,24 @@ public function select() {\n       'civicrm_mailing_event_unsubscribe',\n     );\n \n+    // Define a list of columns that should be counted with the DISTINCT\n+    // keyword. For example, civicrm_mailing_event_opened.unique_open_count\n+    // should display the number of unique records, whereas something like\n+    // civicrm_mailing_event_opened.open_count should display the total number.\n+    // Each string here is in the form $tableName.$fieldName, where $tableName\n+    // is the key in $this->_columns, and $fieldName is the key in that array's\n+    // ['fields'] array.\n+    // Reference: CRM-20660\n+    $distinct_count_columns = array(","path":"CRM/Report/Form/Mailing/Summary.php","position":null,"original_position":12,"commit_id":"d7860c237e96210b15c033e2e3336da2b64508c9","original_commit_id":"1b08b468b6f8dd8e3a5cce42115fcedb199464ab","user":{"login":"twomice","id":759449,"avatar_url":"https://avatars1.githubusercontent.com/u/759449?v=3","gravatar_id":"","url":"https://api.github.com/users/twomice","html_url":"https://github.com/twomice","followers_url":"https://api.github.com/users/twomice/followers","following_url":"https://api.github.com/users/twomice/following{/other_user}","gists_url":"https://api.github.com/users/twomice/gists{/gist_id}","starred_url":"https://api.github.com/users/twomice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twomice/subscriptions","organizations_url":"https://api.github.com/users/twomice/orgs","repos_url":"https://api.github.com/users/twomice/repos","events_url":"https://api.github.com/users/twomice/events{/privacy}","received_events_url":"https://api.github.com/users/twomice/received_events","type":"User","site_admin":false},"body":"Funny, I wasn't aware of that part of the standard, somehow. Done.","created_at":"2017-06-13T16:19:39Z","updated_at":"2017-06-13T16:19:39Z","html_url":"https://github.com/civicrm/civicrm-core/pull/10443#discussion_r121727121","pull_request_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443","_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/121727121"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/10443#discussion_r121727121"},"pull_request":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443"}}},"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443","id":123147893,"html_url":"https://github.com/civicrm/civicrm-core/pull/10443","diff_url":"https://github.com/civicrm/civicrm-core/pull/10443.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/10443.patch","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/10443","number":10443,"state":"open","locked":false,"title":"Fix CRM-20660: Total Opens should count without DISTINCT keyword.","user":{"login":"twomice","id":759449,"avatar_url":"https://avatars1.githubusercontent.com/u/759449?v=3","gravatar_id":"","url":"https://api.github.com/users/twomice","html_url":"https://github.com/twomice","followers_url":"https://api.github.com/users/twomice/followers","following_url":"https://api.github.com/users/twomice/following{/other_user}","gists_url":"https://api.github.com/users/twomice/gists{/gist_id}","starred_url":"https://api.github.com/users/twomice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twomice/subscriptions","organizations_url":"https://api.github.com/users/twomice/orgs","repos_url":"https://api.github.com/users/twomice/repos","events_url":"https://api.github.com/users/twomice/events{/privacy}","received_events_url":"https://api.github.com/users/twomice/received_events","type":"User","site_admin":false},"body":"WIP until all checks pass.\n\n---\n\n * [CRM-20660: Mail Summary Report showing same number for Total Opens and Unique Opens](https://issues.civicrm.org/jira/browse/CRM-20660)","created_at":"2017-05-30T21:28:45Z","updated_at":"2017-06-13T16:19:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7aa104e4977bfeb01a6b6127dead828ba019c697","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443/commits","review_comments_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443/comments","review_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/10443/comments","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/d7860c237e96210b15c033e2e3336da2b64508c9","head":{"label":"twomice:CRM-20660_total_vs_unique_opens","ref":"CRM-20660_total_vs_unique_opens","sha":"d7860c237e96210b15c033e2e3336da2b64508c9","user":{"login":"twomice","id":759449,"avatar_url":"https://avatars1.githubusercontent.com/u/759449?v=3","gravatar_id":"","url":"https://api.github.com/users/twomice","html_url":"https://github.com/twomice","followers_url":"https://api.github.com/users/twomice/followers","following_url":"https://api.github.com/users/twomice/following{/other_user}","gists_url":"https://api.github.com/users/twomice/gists{/gist_id}","starred_url":"https://api.github.com/users/twomice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twomice/subscriptions","organizations_url":"https://api.github.com/users/twomice/orgs","repos_url":"https://api.github.com/users/twomice/repos","events_url":"https://api.github.com/users/twomice/events{/privacy}","received_events_url":"https://api.github.com/users/twomice/received_events","type":"User","site_admin":false},"repo":{"id":8569665,"name":"civicrm-core","full_name":"twomice/civicrm-core","owner":{"login":"twomice","id":759449,"avatar_url":"https://avatars1.githubusercontent.com/u/759449?v=3","gravatar_id":"","url":"https://api.github.com/users/twomice","html_url":"https://github.com/twomice","followers_url":"https://api.github.com/users/twomice/followers","following_url":"https://api.github.com/users/twomice/following{/other_user}","gists_url":"https://api.github.com/users/twomice/gists{/gist_id}","starred_url":"https://api.github.com/users/twomice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twomice/subscriptions","organizations_url":"https://api.github.com/users/twomice/orgs","repos_url":"https://api.github.com/users/twomice/repos","events_url":"https://api.github.com/users/twomice/events{/privacy}","received_events_url":"https://api.github.com/users/twomice/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/twomice/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":true,"url":"https://api.github.com/repos/twomice/civicrm-core","forks_url":"https://api.github.com/repos/twomice/civicrm-core/forks","keys_url":"https://api.github.com/repos/twomice/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twomice/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twomice/civicrm-core/teams","hooks_url":"https://api.github.com/repos/twomice/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/twomice/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/twomice/civicrm-core/events","assignees_url":"https://api.github.com/repos/twomice/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/twomice/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/twomice/civicrm-core/tags","blobs_url":"https://api.github.com/repos/twomice/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twomice/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twomice/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/twomice/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twomice/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/twomice/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/twomice/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/twomice/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/twomice/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/twomice/civicrm-core/subscription","commits_url":"https://api.github.com/repos/twomice/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/twomice/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/twomice/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/twomice/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/twomice/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/twomice/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twomice/civicrm-core/merges","archive_url":"https://api.github.com/repos/twomice/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twomice/civicrm-core/downloads","issues_url":"https://api.github.com/repos/twomice/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/twomice/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/twomice/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/twomice/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twomice/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/twomice/civicrm-core/releases{/id}","deployments_url":"https://api.github.com/repos/twomice/civicrm-core/deployments","created_at":"2013-03-05T01:41:31Z","updated_at":"2016-01-31T23:19:38Z","pushed_at":"2017-06-13T16:19:38Z","git_url":"git://github.com/twomice/civicrm-core.git","ssh_url":"git@github.com:twomice/civicrm-core.git","clone_url":"https://github.com/twomice/civicrm-core.git","svn_url":"https://github.com/twomice/civicrm-core","homepage":null,"size":139783,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"civicrm:master","ref":"master","sha":"a0fba50540f4e44a0833aae24b5eb94b30adb9d1","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars1.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":8495499,"name":"civicrm-core","full_name":"civicrm/civicrm-core","owner":{"login":"civicrm","id":136373,"avatar_url":"https://avatars1.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civicrm/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":false,"url":"https://api.github.com/repos/civicrm/civicrm-core","forks_url":"https://api.github.com/repos/civicrm/civicrm-core/forks","keys_url":"https://api.github.com/repos/civicrm/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civicrm-core/teams","hooks_url":"https://api.github.com/repos/civicrm/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civicrm-core/events","assignees_url":"https://api.github.com/repos/civicrm/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civicrm-core/tags","blobs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/civicrm/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civicrm-core/subscription","commits_url":"https://api.github.com/repos/civicrm/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civicrm-core/merges","archive_url":"https://api.github.com/repos/civicrm/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civicrm-core/downloads","issues_url":"https://api.github.com/repos/civicrm/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civicrm-core/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civicrm-core/deployments","created_at":"2013-03-01T06:11:56Z","updated_at":"2017-06-13T16:01:48Z","pushed_at":"2017-06-13T16:11:57Z","git_url":"git://github.com/civicrm/civicrm-core.git","ssh_url":"git@github.com:civicrm/civicrm-core.git","clone_url":"https://github.com/civicrm/civicrm-core.git","svn_url":"https://github.com/civicrm/civicrm-core","homepage":null,"size":146624,"stargazers_count":200,"watchers_count":200,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":546,"mirror_url":null,"open_issues_count":208,"forks":546,"open_issues":208,"watchers":200,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/10443"},"issue":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/10443"},"comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/10443/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443/comments"},"review_comment":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10443/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civicrm-core/statuses/d7860c237e96210b15c033e2e3336da2b64508c9"}}}}
{"actor":{"display_login":"twomice"}}