Skip to content
Snippets Groups Projects
Commit 22ac99d5 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #767 from greezybacon/issue/757


Mark tickets overdue which have no SLA

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents ea39a677 e5682351
No related branches found
No related tags found
No related merge requests found
......@@ -2167,7 +2167,7 @@ class Ticket {
function checkOverdue() {
$sql='SELECT ticket_id FROM '.TICKET_TABLE.' T1 '
.' INNER JOIN '.SLA_TABLE.' T2 ON (T1.sla_id=T2.id AND T2.isactive=1) '
.' LEFT JOIN '.SLA_TABLE.' T2 ON (T1.sla_id=T2.id AND T2.isactive=1) '
.' WHERE status=\'open\' AND isoverdue=0 '
.' AND ((reopened is NULL AND duedate is NULL AND TIME_TO_SEC(TIMEDIFF(NOW(),T1.created))>=T2.grace_period*3600) '
.' OR (reopened is NOT NULL AND duedate is NULL AND TIME_TO_SEC(TIMEDIFF(NOW(),reopened))>=T2.grace_period*3600) '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment