From a31b650c6e952143a65a8eb273eb821cd463d0ee Mon Sep 17 00:00:00 2001 From: Ravish Nair Date: Fri, 28 Jun 2013 12:42:12 +0530 Subject: [PATCH] -- CRM-12787 applied patch and made some modification ---------------------------------------- * CRM-12787: Case Detail report: add filter & display column for Deleted http://issues.civicrm.org/jira/browse/CRM-12787 --- CRM/Report/Form/Case/Detail.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CRM/Report/Form/Case/Detail.php b/CRM/Report/Form/Case/Detail.php index f108ff673e..16fb5b5ead 100644 --- a/CRM/Report/Form/Case/Detail.php +++ b/CRM/Report/Form/Case/Detail.php @@ -62,6 +62,8 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { $this->rel_types[$relid] = $v['label_b_a']; } + $this->deleted_labels = array('' => ts('- select -'), 0 => ts('No'), 1 => ts('Yes')); + $this->caseActivityTypes = array(); foreach (CRM_Case_PseudoConstant::caseActivityType() as $typeDetail) { $this->caseActivityTypes[$typeDetail['id']] = $typeDetail['label']; @@ -88,6 +90,10 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { ), 'status_id' => array('title' => ts('Case Status')), 'case_type_id' => array('title' => ts('Case Type')), + 'is_deleted' => array('title' => ts('Deleted?'), + 'default' => FALSE, + 'type' => CRM_Utils_Type::T_INT, + ), ), 'filters' => array( @@ -107,6 +113,12 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $this->case_types, ), + 'is_deleted' => array('title' => ts('Deleted?'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_SELECT, + 'options' => $this->deleted_labels, + 'default' => 0, + ), ), ), 'civicrm_contact' => @@ -639,6 +651,12 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { $entryFound = TRUE; } + if (array_key_exists('civicrm_case_is_deleted', $row)) { + $value = $row['civicrm_case_is_deleted']; + $rows[$rowNum]['civicrm_case_is_deleted'] = $this->deleted_labels[$value]; + $entryFound = TRUE; + } + if (!$entryFound) { break; } -- 2.25.1