Bulk actions update

This commit is contained in:
2026-01-08 23:30:25 -05:00
parent 61e3bd69ff
commit 2e7956ce40
4 changed files with 203 additions and 2 deletions

View File

@@ -128,6 +128,36 @@ class BulkOperationsModel {
}
}
break;
case 'bulk_status':
if (isset($parameters['status'])) {
$currentTicket = $ticketModel->getTicketById($ticketId);
if ($currentTicket) {
$success = $ticketModel->updateTicket([
'ticket_id' => $ticketId,
'title' => $currentTicket['title'],
'description' => $currentTicket['description'],
'category' => $currentTicket['category'],
'type' => $currentTicket['type'],
'status' => $parameters['status'],
'priority' => $currentTicket['priority']
], $operation['performed_by']);
if ($success) {
$auditLogModel->log($operation['performed_by'], 'update', 'ticket', $ticketId,
['status' => $parameters['status'], 'bulk_operation_id' => $operationId]);
}
}
}
break;
case 'bulk_delete':
$success = $ticketModel->deleteTicket($ticketId);
if ($success) {
$auditLogModel->log($operation['performed_by'], 'delete', 'ticket', $ticketId,
['bulk_operation_id' => $operationId]);
}
break;
}
if ($success) {