mirror of https://github.com/MISP/MISP
fix: [dashboard:widgets] Reverted `only_full_group_by` fix as it returns incorrect data
Will need to fix this later onpull/9250/head
parent
3c097f8202
commit
22e863fac3
|
@ -92,7 +92,7 @@ class EventEvolutionLineWidget
|
|||
'recursive' => -1,
|
||||
'conditions' => $eparams['conditions'],
|
||||
'fields' => ['DATE_FORMAT(FROM_UNIXTIME(Event.publish_timestamp), "%Y-%m") AS date', 'count(id) AS count'],
|
||||
'group' => ['MONTH(FROM_UNIXTIME(Event.publish_timestamp)), YEAR(FROM_UNIXTIME(Event.publish_timestamp))', 'Event.publish_timestamp',]
|
||||
'group' => ['MONTH(FROM_UNIXTIME(Event.publish_timestamp)), YEAR(FROM_UNIXTIME(Event.publish_timestamp))',]
|
||||
|
||||
]);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class OrgEvolutionLineWidget
|
|||
'recursive' => -1,
|
||||
'conditions' => $params['conditions'],
|
||||
'fields' => ['DATE_FORMAT(date_created, "%Y-%m") AS date', 'count(id) AS count'],
|
||||
'group' => ['MONTH(date_created), YEAR(date_created)', 'Organisation.date_created', ]
|
||||
'group' => ['MONTH(date_created), YEAR(date_created)', ]
|
||||
|
||||
]);
|
||||
usort($raw, [$this, 'sortByCreationDate']);
|
||||
|
|
|
@ -99,7 +99,7 @@ class TrendingAttributesWidget
|
|||
$values = $attributeModel->find('all', [
|
||||
'recursive' => -1,
|
||||
'fields' => ['Attribute.value1', 'count(Attribute.value1) as Attribute__frequency'],
|
||||
'group' => ['Attribute.value1', 'Event.orgc_id', 'Event.id',], // Multiple group for `only_full_group_by`
|
||||
'group' => ['Attribute.value1', ],
|
||||
'conditions' => $conditions,
|
||||
'contain' => ['Event.orgc_id'],
|
||||
'order' => 'count(Attribute.value1) desc',
|
||||
|
|
Loading…
Reference in New Issue