diff --git a/admin/sla.php b/admin/sla.php index 55d5cc7c9..26ee69b6a 100644 --- a/admin/sla.php +++ b/admin/sla.php @@ -257,7 +257,7 @@ $pill_url = function ($view) use ($on_days) {
- SLA Summary report + SLA Performance report SLA by Client report @@ -363,13 +363,16 @@ $pill_url = function ($view) use ($on_days) { $used = $used_text($sla); $default_priorities = $default_for[$sla_id] ?? []; $edit_url = "modals/sla/sla_edit.php?id=$sla_id"; - // What archiving it changes, for the confirmation - the part that differs from one SLA to the next first + // What archiving it changes, for the confirmation - the part that differs from one SLA to the next first. + // As getTicketSlaId() has it: a default that is archived gives nothing, and a contract's falls back to the default. + $contracts_giving = intval($sla_used[$sla_id]['contracts'] ?? 0); + $default_priorities_text = implode(' and ', array_filter([implode(', ', array_slice($default_priorities, 0, -1)), end($default_priorities) ?: ''])); $gives = array_filter([ - $default_priorities ? 'it is the default for ' . implode(', ', $default_priorities) . ' tickets' : '', - !empty($sla_used[$sla_id]['contracts']) ? number_format($sla_used[$sla_id]['contracts']) . ' contract' . ($sla_used[$sla_id]['contracts'] === 1 ? ' gives' : 's give') . ' it' : '', + $default_priorities ? "It is the default for $default_priorities_text tickets, which get no SLA from then on." : '', + $contracts_giving ? number_format($contracts_giving) . ' contract' . ($contracts_giving === 1 ? ' gives' : 's give') . ' it - new tickets under ' . ($contracts_giving === 1 ? 'it' : 'them') . ' get the default for their priority instead.' : '', ]); $open_tickets = intval($sla['n_tickets']); - $archive_text = ($gives ? ucfirst(implode(' and ', $gives)) . ' - those tickets get no SLA from then on. ' : 'New tickets no longer get it. ') + $archive_text = ($gives ? implode(' ', $gives) : 'New tickets no longer get it.') . ' ' . ($open_tickets ? 'The ' . number_format($open_tickets) . ' open ticket' . ($open_tickets === 1 ? ' on it keeps its' : 's on it keep their') . ' targets.' : 'Tickets that have it keep their targets.'); ?>SLAs are optional. A new ticket gets the SLA its client's contract gives its priority, else the default for the priority. With neither, it has none and nothing about it changes.
Targets are business time. = $day_minutes > 0 ? 'Four hours given an hour before the day ends runs out three hours into the next business day - and 24 hours is ' . escapeHtml(formatSlaMinutes(1440, true)) . '.' : 'With no business days picked the clocks run around the clock, so a target is plain time.' ?>
Two clocks. Response runs until the first reply. Resolution runs until the ticket is resolved, and stops while it is in a status that pauses it, like On Hold - set in Ticket Statuses.
-How you're doing. The SLA Summary and SLA by Client reports show how often targets were met.
+How you're doing. The SLA Performance and SLA by Client reports show how often targets were met.