Ticket Statuses from DB / touchups

This commit is contained in:
Marcus Hill
2024-03-29 12:08:02 +00:00
parent 2e95b7cb6e
commit a961b8aa72
+14 -8
View File
@@ -367,14 +367,20 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
} }
// Get who last updated the ticket - to be shown in the last Response column // Get who last updated the ticket - to be shown in the last Response column
$ticket_reply_type = "Client"; // Default to client for unreplied tickets
$ticket_reply_by_display = ""; // Default none // Defaults to prevent undefined errors
$sql_ticket_reply = mysqli_query($mysqli, "SELECT ticket_reply_type, ticket_reply_created_at, contact_name, user_name FROM ticket_replies $ticket_reply_created_at = "";
LEFT JOIN users ON ticket_reply_by = user_id $ticket_reply_created_at_time_ago = "";
LEFT JOIN contacts ON ticket_reply_by = contact_id $ticket_reply_by_display = "";
WHERE ticket_reply_ticket_id = $ticket_id $ticket_reply_type = "Client"; // Default to client for un-replied tickets
AND ticket_reply_archived_at IS NULL
ORDER BY ticket_reply_id DESC LIMIT 1" $sql_ticket_reply = mysqli_query($mysqli,
"SELECT ticket_reply_type, ticket_reply_created_at, contact_name, user_name FROM ticket_replies
LEFT JOIN users ON ticket_reply_by = user_id
LEFT JOIN contacts ON ticket_reply_by = contact_id
WHERE ticket_reply_ticket_id = $ticket_id
AND ticket_reply_archived_at IS NULL
ORDER BY ticket_reply_id DESC LIMIT 1"
); );
$row = mysqli_fetch_array($sql_ticket_reply); $row = mysqli_fetch_array($sql_ticket_reply);