diff --git a/create_ticket_api.php b/create_ticket_api.php index ff7e080..a479e94 100644 --- a/create_ticket_api.php +++ b/create_ticket_api.php @@ -158,7 +158,7 @@ function generateTicketHash($data) $issueSubtype = 'clock_skew'; } elseif (stripos($title, 'cluster usage') !== false) { $issueSubtype = 'usage'; - } elseif (stripos($title, 'OSD down') !== false || preg_match('/OSD\s+osd\.\d+\s+is\s+DOWN/i', $title)) { + } elseif (stripos($title, 'OSD down') !== false || preg_match('/osd\.\d+\s+is\s+DOWN/i', $title)) { // Include the specific OSD ID so each individual OSD gets its own ticket if (preg_match('/osd\.(\d+)/i', $title, $osdMatch)) { $issueSubtype = 'osd_down_' . $osdMatch[1]; @@ -228,8 +228,12 @@ if ($existing) { if ($existingStatus !== 'Closed') { // Ticket is still active — update title, escalate priority, and refresh +<<<<<<< HEAD // the description with the latest sensor data if the new report is more severe // (lower priority number = higher severity). +======= + // description with latest sensor data. +>>>>>>> development $changes = []; $updateSql = "UPDATE tickets SET updated_at = NOW(), updated_by = ?"; $bindTypes = "i"; @@ -290,7 +294,7 @@ if ($existing) { } $auditLog->log($userId, 'update', 'ticket', $existingId, array_merge( - $changes, + array_diff_key($changes, ['description_refreshed' => true]), ['reason' => 'auto-updated by hwmonDaemon (condition worsened)'] ));