diff --git a/include/class.ticket.php b/include/class.ticket.php index 30e4a9917004b83e37c35eae82d3da9ff2d6ad7e..247d869db5d439c311a3a4dee3ff9904ec60ea00 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -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) '