From 17916a24758796a6f7c7b40b964d471c43c49832 Mon Sep 17 00:00:00 2001 From: Octo Hapiness Date: Sat, 16 Dec 2017 09:57:53 +0100 Subject: [PATCH] CRM-21538: Field not found when sorting report by Case Type as a section header --- CRM/Report/Form/Case/Detail.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Report/Form/Case/Detail.php b/CRM/Report/Form/Case/Detail.php index f78e3e3c54..205aa72af4 100644 --- a/CRM/Report/Form/Case/Detail.php +++ b/CRM/Report/Form/Case/Detail.php @@ -549,6 +549,9 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form { if ($this->_caseTypeNameOrderBy) { $this->_orderBy = str_replace('case_civireport.case_type_name', 'civireport_case_types.title', $this->_orderBy); + if (isset($this->_sections['civicrm_case_case_type_name'])) { + $this->_sections['civicrm_case_case_type_name']['dbAlias'] = 'civireport_case_types.title'; + } } } -- 2.25.1