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

[REF] extract calculation of basic stats #13608

Merged
merged 1 commit into from
Feb 16, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Code clean up preliminary to resolving performance issues

Before

Code hard to read

After

Code more readable

Technical Details

Partial of #13607 - adding 'has-tests' which were merged in #13605

Comments

@civibot
Copy link

civibot bot commented Feb 15, 2019

(Standard links)


// make sure contribution is completed - CRM-4989
$completedWhere = $where . " AND civicrm_contribution.contribution_status_id = 1 ";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've been moving this clause into the relevant queries - there just isn't enough gained by sharing bits of queries & it makes it more complicated

@@ -5139,6 +5122,8 @@ public function summaryContribution($context = NULL) {

$summary['total']['mode'] = CRM_Contribute_BAO_Contribution::computeStats('mode', $modeSQL);

// make sure contribution is completed - CRM-4989
$completedWhere = $where . " AND civicrm_contribution.contribution_status_id = 1 ";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for now - but this variable's days are numbered.....

@colemanw colemanw merged commit 354b07f into civicrm:master Feb 16, 2019
@colemanw
Copy link
Member

Merging based on code review and passing tests.

@colemanw colemanw deleted the cont_summary_extract1 branch February 16, 2019 19:21
@eileenmcnaughton
Copy link
Contributor Author

thanks @colemanw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants