rt 4.2.16
[freeside.git] / rt / share / html / Elements / ShowReminders
index 6b5ad39..d9a3ccc 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -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;
@@ -67,7 +67,7 @@ if ( my $ticket= $targets->First ) {
 </%PERL>
 <tr class="<% $i%2 ? 'oddline' : 'evenline' %>">
 <td class="collection-as-table">
-<a href="<% RT->Config->Get('WebPath') %>/Ticket/Reminders.html?id=<% $ticket->id %>"><% $reminder->Subject %></a>
+<a href="<% RT->Config->Get('WebPath') %>/Ticket/Reminders.html?id=<% $ticket->id %>#reminder-<% $reminder->id %>"><% $reminder->Subject %></a>
 </td>
 <td class="collection-as-table">
 <% $overdue ? '<span class="overdue">' : '' |n %><% $dueobj->AgeAsString || loc('Not set') %><% $overdue ? '</span>' : '' |n %>
@@ -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' );