$this->_having = "HAVING " . implode(' AND ', $nullFilters);
}
$this->orderBy();
+ if (!empty($this->_sections) && key($this->_sections) == 'civicrm_activity_activity_date_time') {
+ $this->alterSectionHeaderForDateTime();
+ }
$this->limit();
$sql = "{$this->_select}
FROM civireport_activity_temp_target tar
}
}
+ /*
+ * Alter DateTime section header to group by date from the datetime field.
+ *
+ */
+ public function alterSectionHeaderForDateTime() {
+ $tempQuery = "ALTER TABLE civireport_activity_temp_target ADD COLUMN civicrm_activity_activity_date VARCHAR(128)";
+ CRM_Core_DAO::executeQuery($tempQuery);
+ $updateQuery = "UPDATE civireport_activity_temp_target SET civicrm_activity_activity_date = date(civicrm_activity_activity_date_time)";
+ CRM_Core_DAO::executeQuery($updateQuery);
+ $this->_select .= ', civicrm_activity_activity_date';
+ $this->_sections['civicrm_activity_activity_date'] = $this->_sections['civicrm_activity_activity_date_time'];
+ unset($this->_sections['civicrm_activity_activity_date_time']);
+ $this->assign('sections', $this->_sections);
+ }
+
}