[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-200-ga13aa11
Kevin Falcone
falcone at bestpractical.com
Thu Nov 25 09:07:50 EST 2010
The branch, 3.8-trunk has been updated
via a13aa111b176f8cf5562e5d92f3570188af1794e (commit)
from a43cc31a496b1aa0798826f97ee7b031fd65eb1b (commit)
Summary of changes:
lib/RT/Scrips_Overlay.pm | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit a13aa111b176f8cf5562e5d92f3570188af1794e
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Nov 10 15:29:24 2010 -0500
Add some extra scrip logging when debugging
Tells you more about what scrips were skipped (so if you know 5 were
found and 3 were run, you can tell what was passed over) and better
identified what transaction/ticket those scrips applied to.
diff --git a/lib/RT/Scrips_Overlay.pm b/lib/RT/Scrips_Overlay.pm
index 768f4af..a01de18 100644
--- a/lib/RT/Scrips_Overlay.pm
+++ b/lib/RT/Scrips_Overlay.pm
@@ -229,17 +229,21 @@ sub Prepare {
#Iterate through each script and check it's applicability.
while ( my $scrip = $self->Next() ) {
- next
unless ( $scrip->IsApplicable(
TicketObj => $self->{'TicketObj'},
TransactionObj => $self->{'TransactionObj'}
- ) );
+ ) ) {
+ $RT::Logger->debug("Skipping Scrip #".$scrip->Id." because it isn't applicable");
+ next;
+ }
#If it's applicable, prepare and commit it
- next
unless ( $scrip->Prepare( TicketObj => $self->{'TicketObj'},
TransactionObj => $self->{'TransactionObj'}
- ) );
+ ) ) {
+ $RT::Logger->debug("Skipping Scrip #".$scrip->Id." because it didn't Prepare");
+ next;
+ }
push @{$self->{'prepared_scrips'}}, $scrip;
}
@@ -373,6 +377,8 @@ sub _FindScrips {
$RT::Logger->debug(
"Found ". $self->Count ." scrips for $args{'Stage'} stage"
." with applicable type(s) $args{'Type'}"
+ ." for txn #".$self->{TransactionObj}->Id
+ ." on ticket #".$self->{TicketObj}->Id
);
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list