mirror of
https://github.com/itflow-org/itflow
synced 2026-09-10 00:35:12 +00:00
Ticket SLA: Fix on hold to pause only after first reply, show resolved closed and onhold as fixed on paused sla in the list
This commit is contained in:
@@ -59,6 +59,35 @@ function getInvoiceBadgeColor($invoice_status) {
|
||||
* The display name for a ticket status id, RAW. Escaping is the caller's job -
|
||||
* same convention as getFieldById() above.
|
||||
*/
|
||||
/*
|
||||
* Fixed SLA clock behaviour for the five built-in ticket statuses.
|
||||
*
|
||||
* New and Open always run the resolution clock; On Hold, Resolved and Closed
|
||||
* always stop it, and none of the five can be configured otherwise. A ticket
|
||||
* nobody can work on should not burn resolution budget, and a finished ticket
|
||||
* has a verdict rather than a clock.
|
||||
*
|
||||
* Resolved and Closed additionally stop BOTH clocks through ticket_resolved_at
|
||||
* and ticket_closed_at, which cron/ticket_sla.php and syncTicketSlaClock() read
|
||||
* directly - their behaviour never depended on this flag and still does not.
|
||||
* The flag is set on them so every SLA surface reads one consistent answer.
|
||||
*
|
||||
* Returns 1 or 0 for a built-in status, or null for a custom one (id > 5),
|
||||
* which the admin configures freely.
|
||||
*/
|
||||
function getTicketStatusSlaLock($ticket_status_id)
|
||||
{
|
||||
$locked_statuses = [
|
||||
1 => 0, // New
|
||||
2 => 0, // Open
|
||||
3 => 1, // On Hold
|
||||
4 => 1, // Resolved
|
||||
5 => 1, // Closed
|
||||
];
|
||||
|
||||
return $locked_statuses[intval($ticket_status_id)] ?? null;
|
||||
}
|
||||
|
||||
function getTicketStatusName($ticket_status) {
|
||||
|
||||
global $mysqli;
|
||||
|
||||
Reference in New Issue
Block a user