diff --git a/tickets.php b/tickets.php index 81fb481a0..2a3e1345a 100644 --- a/tickets.php +++ b/tickets.php @@ -80,12 +80,12 @@ $total_tickets_closed = intval($row['total_tickets_closed']); //Get Unassigned tickets -$sql_total_tickets_unassigned = mysqli_query($mysqli, "SELECT COUNT(ticket_id) AS total_tickets_unassigned FROM tickets WHERE ticket_assigned_to = '0' AND ticket_closed_at IS NULL"); +$sql_total_tickets_unassigned = mysqli_query($mysqli, "SELECT COUNT(ticket_id) AS total_tickets_unassigned FROM tickets WHERE ticket_assigned_to = '0' AND ticket_resolved_at IS NULL"); $row = mysqli_fetch_array($sql_total_tickets_unassigned); $total_tickets_unassigned = intval($row['total_tickets_unassigned']); //Get Total tickets assigned to me -$sql_total_tickets_assigned = mysqli_query($mysqli, "SELECT COUNT(ticket_id) AS total_tickets_assigned FROM tickets WHERE ticket_assigned_to = $session_user_id AND ticket_closed_at IS NULL"); +$sql_total_tickets_assigned = mysqli_query($mysqli, "SELECT COUNT(ticket_id) AS total_tickets_assigned FROM tickets WHERE ticket_assigned_to = $session_user_id AND ticket_resolved_at IS NULL"); $row = mysqli_fetch_array($sql_total_tickets_assigned); $user_active_assigned_tickets = intval($row['total_tickets_assigned']);