diff --git a/portal/ticket_view_all.php b/portal/ticket_view_all.php index 8abefd094..6322f78b1 100644 --- a/portal/ticket_view_all.php +++ b/portal/ticket_view_all.php @@ -16,10 +16,10 @@ if (!isset($_GET['status'])) { // If nothing is set, assume we only want to see open tickets $status = 'Open'; - $ticket_status_snippet = "ticket_status != 5"; + $ticket_status_snippet = "ticket_closed_at IS NULL"; } elseif (isset($_GET['status']) && ($_GET['status']) == 'Closed') { $status = 'Closed'; - $ticket_status_snippet = "ticket_status = 5"; + $ticket_status_snippet = "ticket_closed_at IS NOT NULL"; } else { $status = '%'; $ticket_status_snippet = "ticket_status LIKE '%'"; diff --git a/portal/tickets.php b/portal/tickets.php index 523d54354..1c9ebdebd 100644 --- a/portal/tickets.php +++ b/portal/tickets.php @@ -13,10 +13,10 @@ if (!isset($_GET['status'])) { // If nothing is set, assume we only want to see open tickets $status = 'Open'; - $ticket_status_snippet = "ticket_status != 5 AND ticket_status != 'Closed'"; + $ticket_status_snippet = "ticket_closed_at IS NULL"; } elseif (isset($_GET['status']) && ($_GET['status']) == 'Closed') { $status = 'Closed'; - $ticket_status_snippet = "ticket_status = 5 OR ticket_status = 'Closed'"; + $ticket_status_snippet = "ticket_closed_at IS NOT NULL"; } else { $status = '%'; $ticket_status_snippet = "ticket_status LIKE '%'";