diff --git a/include/class.ticket.php b/include/class.ticket.php index f451de786c52c8b59ac520e8e4df7996d4fbb696..daa241d914ec7b70181d365ca2b5b7a87903b6fa 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -864,12 +864,15 @@ class Ticket { case 'open': // TODO: check current status if it allows for reopening if ($this->isClosed()) { - $sql.= ',closed=NULL, reopened=NOW() '; - + $sql .= ',closed=NULL, reopened=NOW() '; $ecb = function ($t) { $t->logEvent('reopened', 'closed'); }; } + + // If the ticket is not open then clear answered flag + if (!$this->isOpen()) + $sql .= ', isanswered = 0 '; break; default: return false;