CRM-16503 - Remove obsolete special handling of case type filter in Case Detail Report.
authorDave Greenberg <dave@civicrm.org>
Fri, 22 May 2015 22:52:17 +0000 (15:52 -0700)
committerDave Greenberg <dave@civicrm.org>
Fri, 22 May 2015 22:52:17 +0000 (15:52 -0700)
----------------------------------------
* CRM-16503: CiviCase Detail Report: Filter by Case Type finds no results
  https://issues.civicrm.org/jira/browse/CRM-16503

CRM/Report/Form/Case/Detail.php

index 9483be3167f0d071cd65ea42241b9a98643f30a8..77071a324ef72e8a8a111ddaea6bebdffd1aefe7 100644 (file)
@@ -412,15 +412,7 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form {
               !empty($this->_params['case_type_id_value'])
             ) {
               foreach ($this->_params['case_type_id_value'] as $key => $value) {
-                if (strpos($value, CRM_Core_DAO::VALUE_SEPARATOR) === FALSE) {
-                  $value = CRM_Core_DAO::VALUE_SEPARATOR . $value .
-                    CRM_Core_DAO::VALUE_SEPARATOR;
-
-                  $this->_params['case_type_id_value'][$key] = "'{$value}'";
-                }
-                else {
-                  $this->_params['case_type_id_value'][$key] = $value;
-                }
+                $this->_params['case_type_id_value'][$key] = $value;
               }
             }
 
@@ -471,16 +463,6 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form {
     $sql = "{$select} {$this->_from} {$this->_where}";
     $countryCount = CRM_Core_DAO::singleValueQuery($sql);
 
-    //CaseType statistics
-    if (array_key_exists('filters', $statistics)) {
-      foreach ($statistics['filters'] as $id => $value) {
-        if ($value['title'] == 'Case Type') {
-          $statistics['filters'][$id]['value'] = 'Is ' .
-            $this->case_types[substr($statistics['filters'][$id]['value'], -3, -2
-            )];
-        }
-      }
-    }
     $statistics['counts']['case'] = array(
       'title' => ts('Total Number of Cases '),
       'value' => isset($statistics['counts']['rowsFound']) ? $statistics['counts']['rowsFound']['value'] : count($rows),