From 742749c58a2587e9f11ef6291e760c5c27e810b9 Mon Sep 17 00:00:00 2001 From: Alok Patel Date: Sun, 7 Oct 2018 15:19:29 +0530 Subject: [PATCH] CIVICRM-965: Added relationship active filter in CiviCRM Case reports. --- CRM/Report/Form/Case/Detail.php | 11 +++++++++-- CRM/Report/Form/Case/Summary.php | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CRM/Report/Form/Case/Detail.php b/CRM/Report/Form/Case/Detail.php index 34572e2da5..bc68852e8c 100644 --- a/CRM/Report/Form/Case/Detail.php +++ b/CRM/Report/Form/Case/Detail.php @@ -180,6 +180,12 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->rel_types, ), + 'is_active' => array( + 'title' => ts('Active Role?'), + 'type' => CRM_Utils_Type::T_BOOLEAN, + 'default' => TRUE, + 'options' => CRM_Core_SelectValues::boolean(), + ), ), ), 'civicrm_email' => array( @@ -572,8 +578,9 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { } public function checkEnabledFields() { - if (isset($this->_params['case_role_value']) - && !empty($this->_params['case_role_value']) + if ((isset($this->_params['case_role_value']) + && !empty($this->_params['case_role_value'])) || + (isset($this->_params['is_active_value'])) ) { $this->_relField = TRUE; } diff --git a/CRM/Report/Form/Case/Summary.php b/CRM/Report/Form/Case/Summary.php index 51d632e275..c682772f40 100644 --- a/CRM/Report/Form/Case/Summary.php +++ b/CRM/Report/Form/Case/Summary.php @@ -182,6 +182,12 @@ class CRM_Report_Form_Case_Summary extends CRM_Report_Form { 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->rel_types, ), + 'is_active' => array( + 'title' => ts('Active Relationship?'), + 'type' => CRM_Utils_Type::T_BOOLEAN, + 'default' => TRUE, + 'options' => CRM_Core_SelectValues::boolean(), + ), ), ), 'civicrm_relationship_type' => array( -- 2.25.1