// note the group by columns are same as that used in alterDisplay as $newRows - $key
$this->limit();
+ $this->orderBy();
$sql = "{$this->_select}
FROM civicrm_temp_civireport_logsummary entity_log_civireport
WHERE {$logTypeTableClause}
GROUP BY log_civicrm_entity_log_date, log_civicrm_entity_log_type_label, log_civicrm_entity_log_conn_id, log_civicrm_entity_log_user_id, log_civicrm_entity_altered_contact_id, log_civicrm_entity_log_grouping
-ORDER BY log_civicrm_entity_log_date DESC {$this->_limit}";
+{$this->_orderBy}
+{$this->_limit} ";
$sql = str_replace('modified_contact_civireport.display_name', 'entity_log_civireport.altered_contact', $sql);
$sql = str_replace('modified_contact_civireport.id', 'entity_log_civireport.altered_contact_id', $sql);
$sql = str_replace(array(
'type' => CRM_Utils_Type::T_INT,
),
),
+ 'order_bys' => array(
+ 'log_date' => array(
+ 'title' => ts('Log Date (When)'),
+ 'default' => TRUE,
+ 'default_weight' => '0',
+ 'default_order' => 'DESC',
+ ),
+ 'altered_contact' => array(
+ 'name' => 'display_name',
+ 'title' => ts('Altered Contact'),
+ 'alias' => 'modified_contact_civireport',
+ ),
+ ),
),
'altered_by_contact' => array(
'dao' => 'CRM_Contact_DAO_Contact',
'type' => CRM_Utils_Type::T_STRING,
),
),
+ 'order_bys' => array(
+ 'altered_by_contact' => array(
+ 'name' => 'display_name',
+ 'title' => ts('Altered by'),
+ ),
+ ),
),
);
}