Skip to content
Snippets Groups Projects
Commit 2f28873e authored by jaapjansma's avatar jaapjansma
Browse files

Fixed issue with aggregation on date fields #78

parent 0c4eadc5
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
* Fixed issue with relative date and required filters.
* Compatibility with php 7.0
* Activity search with empty id.
* Fixed issue with aggregation on date fields #78
# Version 1.29
......
......@@ -116,7 +116,7 @@ class FieldSpecification implements SqlFieldSpecification {
*/
public function getSqlGroupByStatement($table_alias) {
if ($this->sqlValueFormatFunction) {
if (stripos($this->sqlValueFormatFunction, '%1') >= 0 && stripos($this->sqlValueFormatFunction, '%2') >= 0) {
if (stripos($this->sqlValueFormatFunction, '%1') !== false && stripos($this->sqlValueFormatFunction, '%2') !== false) {
return "(".str_replace(['%1', '%2'], [$table_alias, $this->getName()], $this->sqlValueFormatFunction). ")";
} else {
return "{$this->sqlValueFormatFunction} (`{$table_alias}`.`{$this->getName()}`)";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment