Skip to content

Commit

Permalink
Merge pull request #15541 from ixiam/dev_issue#1324
Browse files Browse the repository at this point in the history
Adds missing join on the customtable of address customfields while exposed as profile
  • Loading branch information
eileenmcnaughton authored Oct 28, 2019
2 parents 73ad832 + 4ad408a commit d2a94fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Contact/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,9 @@ public function addHierarchicalElements() {
break;

default:
if (isset($addressCustomFields[$elementName]['custom_field_id']) && !empty($addressCustomFields[$elementName]['custom_field_id'])) {
$this->_tables[$tName] = "\nLEFT JOIN $tableName `$tName` ON `$tName`.id = $aName.id";
}
if ($addWhere) {
$this->_whereTables["{$name}-address"] = $addressJoin;
}
Expand Down

0 comments on commit d2a94fa

Please sign in to comment.