From 222b15655cf7edbccdb8f049c1863a1681160241 Mon Sep 17 00:00:00 2001 From: Chamil Wijesooriya Date: Thu, 27 Dec 2018 12:23:17 +0000 Subject: [PATCH] GitLab issue 625 DB error on Case Summary report --- CRM/Report/Form/Case/Summary.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CRM/Report/Form/Case/Summary.php b/CRM/Report/Form/Case/Summary.php index 3308e05bf2..33204494aa 100644 --- a/CRM/Report/Form/Case/Summary.php +++ b/CRM/Report/Form/Case/Summary.php @@ -277,6 +277,13 @@ class CRM_Report_Form_Case_Summary extends CRM_Report_Form { $crt = $this->_aliases['civicrm_relationship_type']; $ccc = $this->_aliases['civicrm_case_contact']; + foreach ($this->_columns['civicrm_relationship']['filters'] as $fieldName => $field) { + if (!empty($this->_params[$fieldName . '_op']) && isset($this->_params[$fieldName . '_value'])) { + $this->_relField = TRUE; + break; + } + } + if ($this->_relField) { $this->_from = " FROM civicrm_contact $c -- 2.25.1