Implement bulk_delete operation; validate operation types
- TicketModel: add deleteTicket() that removes all child records (comments, watchers, dependencies, attachments, custom fields) then deletes the ticket and cleans up physical attachment files - BulkOperationsModel: add bulk_delete case to processBulkOperation() so the "Bulk Delete" UI button actually works instead of silently failing with N failures - bulk_operation.php: validate operation_type against whitelist to reject unknown operations early with a proper error Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -173,6 +173,14 @@ class BulkOperationsModel {
|
||||
}
|
||||
}
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user