Merge branch '1324-Nombre-del-agente-erróneo-en-los-eventos-generados-por-cambio-de-inventario-dev' into 'develop'
group by id_agent in group events See merge request !866
This commit is contained in:
commit
e1cefdb84f
|
@ -146,7 +146,7 @@ function events_get_events_grouped($sql_post, $offset = 0,
|
|||
$sql = "SELECT COUNT(*) FROM (SELECT *
|
||||
FROM $table te
|
||||
WHERE 1=1 " . $sql_post . "
|
||||
GROUP BY estado, evento, id_agentmodule" . $groupby_extra . ") AS t";
|
||||
GROUP BY estado, evento, id_agente, id_agentmodule" . $groupby_extra . ") AS t";
|
||||
}
|
||||
else {
|
||||
$sql = "SELECT *, MAX(id_evento) AS id_evento,
|
||||
|
@ -161,7 +161,7 @@ function events_get_events_grouped($sql_post, $offset = 0,
|
|||
(SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp
|
||||
FROM $table te
|
||||
WHERE 1=1 " . $sql_post . "
|
||||
GROUP BY estado, evento, id_agentmodule" . $groupby_extra . "
|
||||
GROUP BY estado, evento, id_agente, id_agentmodule" . $groupby_extra . "
|
||||
ORDER BY timestamp_rep " . $order . " LIMIT " . $offset . "," . $pagination;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue