From e24e18fb8db46fb52925239f0c6b90d7b1a05b48 Mon Sep 17 00:00:00 2001
From: Anthony Lawrence <freelancer@anthonylawrence.me.uk>
Date: Mon, 16 Feb 2015 21:27:02 +0000
Subject: [PATCH] Fixes #1736 - tickets now have their overdue status cleared
 when it is closed. It uses the inbuilt clearOverdue method to ensure it is
 done properly, rather than setting isoverdue=0

---
 include/class.ticket.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index 2619c625b..3f458cc32 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -847,6 +847,7 @@ class Ticket {
                 $sql.=', closed=NOW(), duedate=NULL ';
                 if ($thisstaff && $set_closing_agent)
                     $sql.=', staff_id='.db_input($thisstaff->getId());
+                $this->clearOverdue();
 
                 $ecb = function($t) {
                     $t->reload();
-- 
GitLab