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

sartak at bestpractical.com sartak at bestpractical.com
Wed Mar 18 13:36:07 EDT 2009


Author: sartak
Date: Wed Mar 18 13:36:07 2009
New Revision: 18837

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

Log:
Tickets always have a Told time (even if it's unset)

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	Wed Mar 18 13:36:07 2009
@@ -336,6 +336,7 @@
         starts              => undef,
         started             => undef,
         resolved            => undef,
+        told                => undef,
         mime_obj            => undef,
         _record_transaction => 1,
         dry_run             => 0,
@@ -435,6 +436,12 @@
         $Resolved->set( format => 'ISO', value => $args{'resolved'} );
     }
 
+    my $told = RT::Date->new();
+    if ( defined $args{'told'} ) {
+        $told->set( format => 'ISO', value => $args{'told'} );
+    }
+
+
     #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." );
@@ -536,6 +543,7 @@
         starts           => $starts->iso,
         started          => $started->iso,
         resolved         => $Resolved->iso,
+        told             => $told->iso,
         due              => $due->iso
     );
 


More information about the Rt-commit mailing list