[Rt-commit] r18885 - rt/3.999/branches/datetime/lib/RT/Model

sartak at bestpractical.com sartak at bestpractical.com
Fri Mar 20 10:23:08 EDT 2009


Author: sartak
Date: Fri Mar 20 10:23:07 2009
New Revision: 18885

Modified:
   rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm

Log:
Fix to setting resolved date

Modified: rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm	(original)
+++ rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm	Fri Mar 20 10:23:07 2009
@@ -441,6 +441,11 @@
     if ( defined $args{'resolved'} ) {
         $resolved = RT::DateTime->new_from_string($args{'resolved'});
     }
+    #If the status is an inactive status, set the resolved date
+    elsif ( $queue_obj->status_schema->is_inactive( $args{'status'} ) ) {
+        Jifty->log->debug( "Got a " . $args{'status'} . "(inactive) ticket with undefined resolved date. Setting to now." );
+        $resolved = RT::DateTime->now;
+    }
     else {
         $resolved = RT::DateTime->new_unset;
     }
@@ -453,12 +458,6 @@
         $told = RT::DateTime->new_unset;
     }
 
-    #If the status is an inactive status, set the resolved date
-    elsif ( $queue_obj->status_schema->is_inactive( $args{'status'} ) ) {
-        Jifty->log->debug( "Got a " . $args{'status'} . "(inactive) ticket with undefined resolved date. Setting to now." );
-        $resolved->set_to_now;
-    }
-
     # }}}
 
     # {{{ Dealing with time fields


More information about the Rt-commit mailing list