Commit 3b1e96bc authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

cleanup debug code

* fix some bugs
parent d86f44b7
......@@ -12,12 +12,13 @@
</tr>
% while ( my ($owner, $stats) = each %$result ) {
<tr><td><% $owner %><td>
<tr>
<td><% $owner %></td>
% my $i = 1;
% foreach ( map $stats->{ $_ }, grep $i++%2, @columns ) {
<td><% $_ || 0 %></td>
% }
</tr>
</tr>
% }
</table>
......@@ -34,10 +35,9 @@ my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
$tickets->FromSQL( $Query );
$tickets->OrderByCols( {FIELD => 'id', ORDER => 'ASC'} );
while ( my $ticket = $tickets->Next ) {
my $report = RT::Extension::SLA->Report( Ticket => $ticket );
my $report = RT::Extension::SLA->Report( $ticket );
$summary->AddReport( $report );
}
my $result = $summary->Result;
</%INIT>
......@@ -39,6 +39,8 @@ sub Run {
}
next unless $h;
$RT::Logger->debug( "Handling transaction #". $txn->id ." ($type, $field) of ticket #". $self->{'Ticket'}->id );
$self->$h( Ticket => $self->{'Ticket'}, Transaction => $txn, State => $state );
}
return $self;
......@@ -71,9 +73,6 @@ sub Handlers {
DelWatcher => { Requestor => 'OnRequestorChange' },
};
use Data::Dumper;
Test::More::diag( Dumper $cache );
return $cache;
} }
......@@ -131,7 +130,10 @@ sub OnResponse {
$act->{'acted'} = $txn->CreatedObj->Unix;
} else {
unless ( $act ) {
die "not yet implemented";
$act = $args{'State'}->{'act'} = {};
$act->{'requestor'} = 0;
$act->{'acted'} = $txn->CreatedObj->Unix;
return;
}
unless ( $act->{'requestor'} ) {
# check keep in loop
......@@ -169,8 +171,6 @@ sub OnResponse {
return;
}
Test::More::diag( 'deadline '. $deadline .' '. Dumper( $args{'State'} ) );
# repsonse
my $failed = $txn->CreatedObj->Unix > $deadline? 1 : 0;
my $owner = $args{'State'}->{'owner'} == $txn->Creator? 1 : 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment