api test fixes
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 27 Apr 2015 13:34:40 +0000 (19:04 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Mon, 27 Apr 2015 13:34:40 +0000 (19:04 +0530)
CRM/Report/Form/Event/ParticipantListCount.php

index 1ca8e8ba80dc7ab68721b92ba1e9e16819a25eb3..dfd83d9aadead38a8275489b7486bcbaa2c795b8 100644 (file)
@@ -114,6 +114,12 @@ class CRM_Report_Form_Event_ParticipantListCount extends CRM_Report_Form_Event {
         ),
         'grouping' => 'contact-fields',
         'order_bys' => array(
+          'sort_name' => array(
+            'title' => ts('Last Name, First Name'),
+            'default' => '1',
+            'default_weight' => '0',
+            'default_order' => 'ASC',
+          ),
           'first_name' => array(
             'name' => 'first_name',
             'title' => ts('First Name'),
@@ -480,9 +486,6 @@ class CRM_Report_Form_Event_ParticipantListCount extends CRM_Report_Form_Event {
       $this->_groupBy = "ORDER BY " . implode(', ', $this->_groupBy) .
         ", {$this->_aliases['civicrm_contact']}.sort_name";
     }
-    else {
-      $this->_groupBy = "ORDER BY {$this->_aliases['civicrm_contact']}.sort_name";
-    }
     $this->_groupBy = "GROUP BY {$this->_aliases['civicrm_participant']}.id " .
       $this->_groupBy;
   }