-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
CRM-21677 reduce unnecessary joins in reports #11889
Conversation
test this |
test this please |
(unrelated fail, paypal should throw an exception for that fn to work) |
$this->_from .= "LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']} ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND {$this->_aliases['civicrm_email']}.is_primary = 1\n"; | ||
} | ||
$this->joinAddressFromContact(); | ||
$this->joinEmailFromContact(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton I don't see any email/address columns in Membership Summary report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm - in construct I see
'civicrm_email' => array(
'dao' => 'CRM_Core_DAO_Email',
'fields' => array('email' => NULL),
'grouping' => 'contact-fields',
),
which seems kinda weird!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same in memberDetail too TBH - what do you think? I'm inclined to merge this as more standardised & safer than stripping out the join. We could also add more email fields/filters - but I'm wary of growing the scope for something neither of us are vested in
merging based o your approval @yashodha & because it doesn't make the issue you noted worse - but we could follow up on that if we choose |
Overview
Reviewers cut of #11550 - reduce unnecessary joins to address tables in reports
Contact/CurrentEmployer
Contribute/Bookkeeping (remove copy & paste code)
Event/ParticipantCount
Event/ParticipantListing
Membership/Summary
Before
unnecessary joins to phone, email and address tables
After
join only when needed, code standardised
Technical Details
This also aligns the approach with that used in the extended report extension - there might be some notices as I have updated the extension where the signature differs from core but will need to drop a new release & people will need to be on it.
Comments
@yashodha now this one