Skip to content
Permalink
Browse files

Overdue oopsie

Commit 17f958c changed overdue query to ORM but failed to take into account
the state of the ticket's status. This resulted in closed tickets being
marked overdue.

This commit fixes the issue by making sure the check is limited to open
tickets only.
  • Loading branch information...
protich committed Oct 11, 2019
1 parent 919e1b7 commit de7271d1de8fd951d387e3039763241fb062fc13
Showing with 5 additions and 0 deletions.
  1. +5 −0 include/class.ticket.php
@@ -2371,6 +2371,10 @@ function markAnswered() {
function markOverdue($whine=true) {
global $cfg;
// Only open tickets can be marked overdue
if (!$this->isOpen())
return false;
if ($this->isOverdue())
return true;
@@ -4535,6 +4539,7 @@ static function checkOverdue() {
$overdue = static::objects()
->filter(array(
'isoverdue' => 0,
'status__state' => 'open',
Q::any(array(
Q::all(array(
'duedate__isnull' => true,

0 comments on commit de7271d

Please sign in to comment.
You can’t perform that action at this time.