CRM-21593: New order by options for WalkList Report
authordeb.monish <monish.deb@jmaconsulting.biz>
Fri, 22 Dec 2017 13:22:42 +0000 (18:52 +0530)
committerdeb.monish <monish.deb@jmaconsulting.biz>
Fri, 22 Dec 2017 13:29:07 +0000 (18:59 +0530)
CRM/Report/Form/Walklist/Walklist.php

index f08f95be3e97402a4c87a2811635e75e27383bc0..6ac324557125f3942c8f8e06bca118935ecc3bf4 100644 (file)
@@ -99,6 +99,13 @@ class CRM_Report_Form_Walklist_Walklist extends CRM_Report_Form {
           '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 @@ class CRM_Report_Form_Walklist_Walklist extends CRM_Report_Form {
           '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(