]> git.uio.no Git - usit-rt.git/blobdiff - share/html/Elements/ShowReminders
Master to 4.2.8
[usit-rt.git] / share / html / Elements / ShowReminders
index 28d7945784a2603e39121cbcfa5b48af149a3cd5..24cadf7015dd0e86d4f30f0081953b6e56fa0b6f 100644 (file)
@@ -57,7 +57,7 @@ my $i =0;
 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;
@@ -76,7 +76,7 @@ if ( my $ticket= $targets->First ) {
 <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>
 % }
@@ -91,7 +91,7 @@ my $tsql = 'Type = "reminder"' .
            ' 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' );