Fix SLA resolve-time reporting, stale settings cache on save, and report N+1

This commit is contained in:
johnnyq
2026-07-29 13:34:34 -04:00
parent 750c2e58cc
commit 566d74c15d
4 changed files with 74 additions and 38 deletions

View File

@@ -50,20 +50,6 @@ function getSlaCompliance($where)
return $compliance;
}
// Colour the headline figures the way the ticket list colours rows
function slaPercentDisplay($percent)
{
if (is_null($percent)) {
return "<span class='text-secondary'>-</span>";
}
if ($percent >= 95) {
return "<span class='text-success text-bold'>$percent%</span>";
}
if ($percent >= 80) {
return "<span class='text-warning text-bold'>$percent%</span>";
}
return "<span class='text-danger text-bold'>$percent%</span>";
}
$overall = getSlaCompliance("AND YEAR(ticket_created_at) = $year");