Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CRM-20660: Total Opens should count without DISTINCT keyword. #10443

Merged
merged 2 commits into from
Jun 16, 2017

Conversation

twomice
Copy link
Contributor

@twomice twomice commented May 30, 2017

@twomice twomice changed the title WIP: Fix CRM-20660: Total Opens should count without DISTINCT keyword. Fix CRM-20660: Total Opens should count without DISTINCT keyword. May 30, 2017
@twomice
Copy link
Contributor Author

twomice commented May 30, 2017

Removing "WIP' prefix now that all checks have passed. This is ready for review.

}
else {
$distinct = '';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove else part and initialize $distinct variable above if condition ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

// is the key in $this->_columns, and $fieldName is the key in that array's
// ['fields'] array.
// Reference: CRM-20660
$distinct_count_columns = array(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please change this to satisfy civi-coding standards(camelCase). It would also be nice to fix $count_tables above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny, I wasn't aware of that part of the standard, somehow. Done.

Copy link
Contributor

@jitendrapurohit jitendrapurohit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested mailing summary report and it seems to show correct count for total, unique after the updated PR.
Thanks.

@colemanw colemanw merged commit f3d6fc6 into civicrm:master Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants