fix: unassigned filter not working + null guards on modal selects
- DashboardController: handle assigned_to='unassigned' before validateUserId() which discarded the string, causing the filter to never reach TicketModel; model already correctly converts 'unassigned' to IS NULL in SQL - dashboard.js: add null guards before .value access on dynamically-created modal selects (bulkPriority, bulkStatus, quickStatusSelect) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -686,7 +686,9 @@ function closeBulkPriorityModal() {
|
||||
}
|
||||
|
||||
function performBulkPriority() {
|
||||
const priority = document.getElementById('bulkPriority').value;
|
||||
const priorityEl = document.getElementById('bulkPriority');
|
||||
if (!priorityEl) return;
|
||||
const priority = priorityEl.value;
|
||||
const ticketIds = getSelectedTicketIds();
|
||||
|
||||
if (!priority) {
|
||||
@@ -789,7 +791,9 @@ function closeBulkStatusModal() {
|
||||
}
|
||||
|
||||
function performBulkStatusChange() {
|
||||
const status = document.getElementById('bulkStatus').value;
|
||||
const bulkStatusEl = document.getElementById('bulkStatus');
|
||||
if (!bulkStatusEl) return;
|
||||
const status = bulkStatusEl.value;
|
||||
const ticketIds = getSelectedTicketIds();
|
||||
|
||||
if (!status) {
|
||||
@@ -986,7 +990,9 @@ function closeQuickStatusModal() {
|
||||
}
|
||||
|
||||
function performQuickStatusChange(ticketId) {
|
||||
const newStatus = document.getElementById('quickStatusSelect').value;
|
||||
const quickStatusEl = document.getElementById('quickStatusSelect');
|
||||
if (!quickStatusEl) return;
|
||||
const newStatus = quickStatusEl.value;
|
||||
|
||||
lt.api.post('/api/update_ticket.php', { ticket_id: ticketId, status: newStatus })
|
||||
.then(data => {
|
||||
|
||||
Reference in New Issue
Block a user