[Rt-commit] r6395 - in rtir/branches/2.1-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Wed Nov 8 15:19:40 EST 2006


Author: ruz
Date: Wed Nov  8 15:19:39 2006
New Revision: 6395

Modified:
   rtir/branches/2.1-EXPERIMENTAL/   (props changed)
   rtir/branches/2.1-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction

Log:
 r1819 at cubic-pc:  cubic | 2006-11-08 23:33:21 +0300
 ticket history
 * skip transactions created by the system user(scrips) where we
   update the _RTIR_IP field


Modified: rtir/branches/2.1-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction	Wed Nov  8 15:19:39 2006
@@ -3,6 +3,13 @@
 # Set $skip to 1 if transaction matches criteria
 # $skip is passed by reference
 
+# skip _RTIR_IP changes done by system user(scrips)
+if ( $Transaction->Creator == $RT::SystemUser->id && $Transaction->Type eq 'CustomField' ) {
+    my $cf = RT::IR::GetCustomField('_RTIR_IP') or return $$skip = 0;
+    return $$skip = 0 unless $cf->id == $Transaction->Field;
+    return $$skip = 1;
+}
+
 # get out of here asap
 unless ( $Transaction->Field eq 'Status' && $Transaction->Type =~ /^(?:Status|Set)$/ ) {
     return $$skip = 0;


More information about the Rt-commit mailing list