From d4e85e501e73631359da545eb24c8a5154806731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 3 Oct 2020 12:11:58 +0300 Subject: [PATCH] another fix --- src/bb-modules/Support/Service.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Support/Service.php b/src/bb-modules/Support/Service.php index 0bf80a45a..e6258dc8e 100644 --- a/src/bb-modules/Support/Service.php +++ b/src/bb-modules/Support/Service.php @@ -355,7 +355,7 @@ class Service implements \Box\InjectionAwareInterface $query = $query . ' WHERE ' . implode(' AND ', $where); } - $query .= " GROUP BY st.id ORDER BY st.priority ASC, st.id DESC"; + $query .= " GROUP BY st.id, stm.id ORDER BY stm.created_at DESC, st.priority ASC, st.id DESC"; return array($query, $bindings); } @@ -1055,7 +1055,7 @@ class Service implements \Box\InjectionAwareInterface $query = $query . ' WHERE ' . implode(' AND ', $where); } - $query .= " GROUP BY spt.id ORDER BY spt.id DESC, sptm.id ASC"; + $query .= " GROUP BY spt.id, sptm.id ORDER BY spt.id DESC, sptm.id ASC"; return array($query, $bindings); }