while ( my $reminder = $reminders->Next ) {
$i++;
my $dueobj = $reminder->DueObj;
-my $overdue = $dueobj->Unix > 0 && $dueobj->Diff < 0 ? 1 : 0;
+my $overdue = $dueobj->IsSet && $dueobj->Diff < 0 ? 1 : 0;
my $targets = RT::Tickets->new($session{'CurrentUser'});
$targets->{'allow_deleted_search'} = 1;
<a href="<% RT->Config->Get( 'WebPath' ) %>/Ticket/Display.html?id=<% $ticket->id %>">#<% $ticket->Id %>: <% $ticket->Subject %></a>
</td>
% } else {
-<td colspan="3" class="collection-as-table>
+<td colspan="3" class="collection-as-table">
<div class="error"><div class="error">Couldn't find Ticket for reminder <% $reminder->id %>. Please contact administrator.</div></div>
</td>
% }
' AND ( Owner = "Nobody" OR Owner ="' . $session{'CurrentUser'}->id . '")' .
' AND ( Status = "new" OR Status = "open" )';
-$tsql .= ' AND Due < "now"' if $OnlyOverdue;
+$tsql .= ' AND ( Due < "now" OR Due IS NULL )' if $OnlyOverdue;
$reminders->FromSQL($tsql);
$reminders->OrderBy( FIELD => 'Due', ORDER => 'ASC' );