[Rt-commit] r7885 - in rtir/branches/2.3-EXPERIMENTAL: html/RTIR/Elements

ruz at bestpractical.com ruz at bestpractical.com
Wed May 16 12:53:58 EDT 2007


Author: ruz
Date: Wed May 16 12:53:57 2007
New Revision: 7885

Modified:
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/ShowDates
   rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueCorrespond.pm

Log:
* each queue allows you to configure a due for each one, the patch
  will permit you to use the default due of the queue, if it's not
  configured, then it's falling over the OverdueAfter, ...
     Thanks to Carlos Fuentes


Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/ShowDates
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/ShowDates	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/ShowDates	Wed May 16 12:53:57 2007
@@ -46,8 +46,8 @@
 % } else {
         <% $due->AsString %>
 % }
-% if ( $Type ne 'Incident' && RT->Config->Get('OverdueAfter') ) {
-        [<a href="Display.html?Due_Date=now%20%2B%20<% RT->Config->Get('OverdueAfter') |u %>%20days&id=<% $Ticket->Id %>"><% loc("Set to [_1] days from now", RT->Config->Get('OverdueAfter') ) %></a>]
+% if ( $Type ne 'Incident' && $Due ) {
+        [<a href="Display.html?Due_Date=now%20%2B%20<% $Due |u %>%20days&id=<% $Ticket->Id %>"><% loc("Set to [_1] days from now", $Due ) %></a>]
 % }
     </td>
   </tr>
@@ -61,4 +61,5 @@
 </%ARGS>
 <%INIT>
 my $Type = RT::IR::TicketType( Ticket => $Ticket );
+my $Due = ( $Ticket->QueueObj->DefaultDueIn || (RT->Config->Get('OverdueAfter')) || 7 ) ;
 </%INIT>

Modified: rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueCorrespond.pm
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueCorrespond.pm	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_SetDueCorrespond.pm	Wed May 16 12:53:57 2007
@@ -76,10 +76,11 @@
     my $self = shift;
 
     my $bizhours = RT::IR::BusinessHours();
-
+	
     my $date = RT::Date->new( $RT::SystemUser );
+    my $due = ( $self->TicketObj->QueueObj->DefaultDueIn || (RT->Config->Get('OverdueAfter')) || 7 ) ;
     $date->SetToNow;
-    $date->AddDays( RT->Config->Get('OverdueAfter') || 7 );
+    $date->AddDays( $due );
 
     my $due = $bizhours->first_after( $date->Unix );
     $date->Set( Format => 'unix', Value => $due );


More information about the Rt-commit mailing list