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;
}
case 'relation_active_period_date_low':
case 'relation_target_name':
case 'relation_status':
+ case 'relation_description':
case 'relation_date_low':
case 'relation_date_high':
$this->relationship($values);
// also get values array for relation_target_name
// for relationship search we always do wildcard
$relationType = $this->getWhereValues('relation_type_id', $grouping);
+ $description = $this->getWhereValues('relation_description', $grouping);
$targetName = $this->getWhereValues('relation_target_name', $grouping);
$relStatus = $this->getWhereValues('relation_status', $grouping);
$targetGroup = $this->getWhereValues('relation_target_group', $grouping);
}
}
+ // Description
+ if (!empty($description[2]) && trim($description[2])) {
+ $this->_qill[$grouping][] = ts('Relationship description - ' . $description[2]);
+ $description = CRM_Core_DAO::escapeString(trim($description[2]));
+ $where[$grouping][] = "civicrm_relationship.description LIKE '%{$description}%'";
+ }
+
// Note we do not currently set mySql to handle timezones, so doing this the old-fashioned way
$today = date('Ymd');
//check for active, inactive and all relation status