Skip to content
Snippets Groups Projects
Commit a31b650c authored by Ravish Nair's avatar Ravish Nair
Browse files

-- 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
parent df7bb675
Branches
Tags
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment