From 12242c6356ca98bcc79126b5c52988ac60d9925f Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Fri, 22 Dec 2017 18:52:42 +0530 Subject: [PATCH] CRM-21593: New order by options for WalkList Report --- CRM/Report/Form/Walklist/Walklist.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CRM/Report/Form/Walklist/Walklist.php b/CRM/Report/Form/Walklist/Walklist.php index f08f95be3e97..6ac324557125 100644 --- a/CRM/Report/Form/Walklist/Walklist.php +++ b/CRM/Report/Form/Walklist/Walklist.php @@ -99,6 +99,13 @@ public function __construct() { 'country_id' => array( 'title' => ts('Country'), ), + 'odd_street_number' => array( + 'title' => ts('Odd/Even Street Number'), + 'type' => CRM_Utils_Type::T_INT, + 'no_display' => TRUE, + 'required' => TRUE, + 'dbAlias' => '(address_civireport.street_number % 2)', + ), ), 'filters' => array( 'street_number' => array( @@ -109,6 +116,18 @@ public function __construct() { 'street_address' => NULL, 'city' => NULL, ), + 'order_bys' => array( + 'street_name' => array( + 'title' => ts('Street Name'), + ), + 'street_number' => array( + 'title' => ts('Street Number'), + ), + 'odd_street_number' => array( + 'title' => ts('Odd/Even Street Number'), + 'dbAlias' => 'civicrm_address_odd_street_number', + ), + ), 'grouping' => 'location-fields', ), 'civicrm_email' => array(