#74 - Sort Ticket Priority properlyClosed
Currently when sorted its sorted alphabeticaly |
|
Milestone: |
25.02 - Stable - Due: 2025-02-28
|
---|---|
Assigned To: |
![]() |
Created Date: | 2025-02-12 18:49:05 |
Closed Date: | 2025-02-12 18:49:50 |
Discussion Link: | https://forum.itflow.org/d/1513-priority-sort-does-it-alphabetically |
Comments 2
https://github.com/itflow-org/itflow/commit/b8d17be0153376053938892637428009844fd4c8
Fixed
ORDER BY
CASE
WHEN '$sort' = 'scheduled_ticket_priority' THEN
CASE ticket_priority
WHEN 'High' THEN 1
WHEN 'Medium' THEN 2
WHEN 'Low' THEN 3
ELSE 4 -- Optional: for unexpected priority values
END
ELSE NULL
END $order,
$sort $order -- Apply normal sorting by $sort and $order
LIMIT $record_from, $record_to"