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

Ensure advanced search displaying related contacts works consitently #20997

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ensure searches that display related contacts work properly
  • Loading branch information
jmcclelland committed Aug 2, 2021
commit ec8e4eb9d2eccf0eaa0fe4911a16d886c6ac67b0
5 changes: 1 addition & 4 deletions CRM/Contact/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -5836,10 +5836,7 @@ public function filterRelatedContacts(&$from, &$where, &$having) {
else {
$from .= $qcache['from'];
}
if (!strlen($where)) {
$where = " WHERE 1 ";
}
$where .= $qcache['where'];
$where = $qcache['where'];
if (!empty($this->_tables['civicrm_case'])) {
// Change the join on CiviCRM case so that it joins on the right contac from the relationship.
$from = str_replace("ON civicrm_case_contact.contact_id = contact_a.id", "ON civicrm_case_contact.contact_id = transform_temp.contact_id", $from);
Expand Down