diff --git a/portal/ticket_view_all.php b/portal/ticket_view_all.php index 8abefd094..b7d03a191 100644 --- a/portal/ticket_view_all.php +++ b/portal/ticket_view_all.php @@ -13,13 +13,13 @@ } // Ticket status from GET -if (!isset($_GET['status'])) { - // If nothing is set, assume we only want to see open tickets +if (!isset($_GET['status']) || ($_GET['status']) == 'Open') { + // Default to showing open $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..f06cd2cfb 100644 --- a/portal/tickets.php +++ b/portal/tickets.php @@ -10,13 +10,13 @@ // Ticket status from GET -if (!isset($_GET['status'])) { - // If nothing is set, assume we only want to see open tickets +if (!isset($_GET['status']) || ($_GET['status']) == 'Open') { + // Default to showing open $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 '%'";