[Rt-commit] rt branch, 3.999-trunk, updated. cc74de26e0b0f215f281beb6bb89eaa68ef146e3

sartak at bestpractical.com sartak at bestpractical.com
Wed Dec 2 07:10:26 EST 2009


The branch, 3.999-trunk has been updated
       via  cc74de26e0b0f215f281beb6bb89eaa68ef146e3 (commit)
      from  e4697bd879eccb9e26b651f893502e39fba408d8 (commit)

Summary of changes:
 lib/RT/Model/Ticket.pm |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

- Log -----------------------------------------------------------------
commit cc74de26e0b0f215f281beb6bb89eaa68ef146e3
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Dec 2 07:10:18 2009 -0500

    The last date field, told

diff --git a/lib/RT/Model/Ticket.pm b/lib/RT/Model/Ticket.pm
index b8d2dcc..b9e90df 100755
--- a/lib/RT/Model/Ticket.pm
+++ b/lib/RT/Model/Ticket.pm
@@ -473,17 +473,6 @@ sub create {
     }
 # }}}
 
-    # {{{ Dates
-    my $told;
-    if ( defined $args{'told'} ) {
-        $told = RT::DateTime->new_from_string($args{'told'});
-    }
-    else {
-        $told = RT::DateTime->new_unset;
-    }
-
-    # }}}
-
     # {{{ Dealing with time fields
 
     $args{'time_estimated'} = 0 unless defined $args{'time_estimated'};
@@ -860,7 +849,6 @@ sub canonicalize_starts {
     }
 
     return RT::DateTime->new_unset;
-
 }
 
 =head2 canonicalize_started
@@ -917,6 +905,23 @@ sub canonicalize_resolved {
     return RT::DateTime->new_unset;
 }
 
+=head2 canonicalize_told
+
+Try to parse the told date as a string.
+
+=cut
+
+sub canonicalize_told {
+    my $self = shift;
+    my $told = shift;
+
+    if (defined $told) {
+        return RT::DateTime->new_from_string($told);
+    }
+
+    return RT::DateTime->new_unset;
+}
+
 sub roles { return ( "cc", "admin_cc", "requestor" ); }
 
 =head2 squelch_mail_to [EMAIL]

-----------------------------------------------------------------------


More information about the Rt-commit mailing list