Fixes order of tickets retrieved by get-all-tickets

This commit is contained in:
Maxi Redigonda 2018-11-07 10:34:14 -03:00
parent b2fb45262b
commit 917520601e
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class GetAllTicketsStaffController extends Controller {
$query = $this->getSearchQuery();
$query .= $this->getStaffDepartmentsQueryFilter();
$query .= $this->getClosedFilter();
$query .= "ORDER BY CASE WHEN (title LIKE ?) THEN 1 ELSE 2 END ASC LIMIT 10 OFFSET " . (($page-1)*10);
$query .= "ORDER BY CASE WHEN (title LIKE ?) THEN 1 ELSE 2 END ASC, id DESC LIMIT 10 OFFSET " . (($page-1)*10);
return Ticket::find($query, [
Controller::request('query') . '%',