diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 17340fbbe9a1..cf4281b6ab7c 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -1065,6 +1065,8 @@ public static function makeURLClause($contactId, $status, $numRelationship, $cou civicrm_relationship_type.id as civicrm_relationship_type_id, civicrm_relationship.start_date as start_date, civicrm_relationship.end_date as end_date, + civicrm_relationship.created_date as created_date, + civicrm_relationship.modified_date as modified_date, civicrm_relationship.description as description, civicrm_relationship.is_active as is_active, civicrm_relationship.is_permission_a_b as is_permission_a_b, @@ -1230,9 +1232,7 @@ public static function getRelationship( // building the query string $queryString = $select1 . $from1 . $where1 . $select2 . $from2 . $where2; - $relationship = new CRM_Contact_DAO_Relationship(); - - $relationship->query($queryString . $order . $limit); + $relationship = CRM_Core_DAO::executeQuery($queryString . $order . $limit); $row = []; if ($count) { $relationshipCount = 0; @@ -1309,6 +1309,8 @@ public static function getRelationship( $values[$rid]['state'] = $relationship->state; $values[$rid]['start_date'] = $relationship->start_date; $values[$rid]['end_date'] = $relationship->end_date; + $values[$rid]['created_date'] = $relationship->created_date; + $values[$rid]['modified_date'] = $relationship->modified_date; $values[$rid]['description'] = $relationship->description; $values[$rid]['is_active'] = $relationship->is_active; $values[$rid]['is_permission_a_b'] = $relationship->is_permission_a_b; diff --git a/templates/CRM/Contact/Page/View/ViewRelationship.tpl b/templates/CRM/Contact/Page/View/ViewRelationship.tpl index 1c675a13a19e..831145e6c192 100644 --- a/templates/CRM/Contact/Page/View/ViewRelationship.tpl +++ b/templates/CRM/Contact/Page/View/ViewRelationship.tpl @@ -50,6 +50,9 @@