[Rt-commit] r6919 - rt/branches/3.6-RELEASE/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Sat Feb 3 17:30:24 EST 2007
Author: ruz
Date: Sat Feb 3 17:30:24 2007
New Revision: 6919
Modified:
rt/branches/3.6-RELEASE/lib/RT/Record.pm
rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
Log:
* 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.6-RELEASE/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Record.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Record.pm Sat Feb 3 17:30:24 2007
@@ -1469,7 +1469,7 @@
$self->_UpdateTimeTaken( $args{'TimeTaken'} );
}
if ( $RT::UseTransactionBatch and $transaction ) {
- push @{$self->{_TransactionBatch}}, $trans;
+ push @{$self->{_TransactionBatch}}, $trans if $args{'CommitScrips'};
}
return ( $transaction, $msg, $trans );
}
Modified: rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm Sat Feb 3 17:30:24 2007
@@ -3433,6 +3433,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