[Rt-commit] r6989 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Tue Feb 13 09:37:06 EST 2007


Author: ruz
Date: Tue Feb 13 09:37:04 2007
New Revision: 6989

Modified:
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Record.pm
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Ticket_Overlay.pm

Log:
 r4534 at cubic-pc (orig r6919):  ruz | 2007-02-04 01:30:24 +0300
 * don't push transactions into batch unless CommitScrips is true,
   this fixes a bug: users click Reply button and we fire a correspond
   scrip that is in the batch stage


Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Record.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Record.pm	Tue Feb 13 09:37:04 2007
@@ -1468,7 +1468,7 @@
         $self->_UpdateTimeTaken( $args{'TimeTaken'} );
     }
     if ( RT->Config->Get('UseTransactionBatch') and $transaction ) {
-	    push @{$self->{_TransactionBatch}}, $trans;
+	    push @{$self->{_TransactionBatch}}, $trans if $args{'CommitScrips'};
     }
     return ( $transaction, $msg, $trans );
 }

Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Ticket_Overlay.pm	Tue Feb 13 09:37:04 2007
@@ -3448,6 +3448,8 @@
     return if $self->{_Destroyed}++;
 
     my $batch = $self->TransactionBatch or return;
+    return unless @$batch;
+
     require RT::Scrips;
     RT::Scrips->new($RT::SystemUser)->Apply(
 	Stage		=> 'TransactionBatch',


More information about the Rt-commit mailing list