[Rt-commit] rt branch, 4.4/fix-unconditional-lastupdated, created. rt-4.2.10-119-g8bc3f88

Alex Vandiver alexmv at bestpractical.com
Thu Apr 9 16:38:26 EDT 2015


The branch, 4.4/fix-unconditional-lastupdated has been created
        at  8bc3f88bce9f02b1a5b5f6c036dc03074d378883 (commit)

- Log -----------------------------------------------------------------
commit 8bc3f88bce9f02b1a5b5f6c036dc03074d378883
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date:   Fri Jun 13 14:32:24 2014 +0200

    Update LastUpdated/LastUpdatedBy only if there is an update

diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 4247668..f66623c 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -498,12 +498,15 @@ sub _Set {
     }
 
     my $old_val = $self->__Value($args{'Field'});
-     $self->_SetLastUpdated();
     my $ret = $self->SUPER::_Set(
         Field => $args{'Field'},
         Value => $args{'Value'},
         IsSQL => $args{'IsSQL'}
     );
+
+    $self->_SetLastUpdated() 
+        unless ( $self->__Value( $args{'Field'} ) eq $old_val ) ;
+
         my ($status, $msg) =  $ret->as_array();
 
         # @values has two values, a status code and a message.

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


More information about the rt-commit mailing list