[Rt-commit] r16137 - rt/3.8/trunk/lib/RT

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Sep 28 04:42:35 EDT 2008


Author: sunnavy
Date: Sun Sep 28 04:42:35 2008
New Revision: 16137

Modified:
   rt/3.8/trunk/lib/RT/Transaction_Overlay.pm

Log:
Told has its own type: Told

Modified: rt/3.8/trunk/lib/RT/Transaction_Overlay.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Transaction_Overlay.pm	(original)
+++ rt/3.8/trunk/lib/RT/Transaction_Overlay.pm	Sun Sep 28 04:42:35 2008
@@ -764,6 +764,21 @@
             return ( $self->Data );
         }
     },
+    Told => sub {
+        my $self = shift;
+        if ( $self->Field eq 'Told' ) {
+            my $t1 = new RT::Date($self->CurrentUser);
+            $t1->Set(Format => 'ISO', Value => $self->NewValue);
+            my $t2 = new RT::Date($self->CurrentUser);
+            $t2->Set(Format => 'ISO', Value => $self->OldValue);
+            return $self->loc( "[_1] changed from [_2] to [_3]", $self->loc($self->Field), $t2->AsString, $t1->AsString );
+        }
+        else {
+            return $self->loc( "[_1] changed from [_2] to [_3]",
+                               $self->loc($self->Field),
+                               ($self->OldValue? "'".$self->OldValue ."'" : $self->loc("(no value)")) , "'". $self->NewValue."'" );
+        }
+    },
     Set => sub {
         my $self = shift;
         if ( $self->Field eq 'Password' ) {


More information about the Rt-commit mailing list