Find payment details in ticket traffic from previous.
This commit is contained in:
parent
77f47bb9e1
commit
c385cda4e4
1 changed files with 14 additions and 0 deletions
|
@ -258,6 +258,20 @@ while (my $file = readdir $dh) {
|
||||||
"ticket is in status \"$mainTicketStatus\" instead of \"needs-project-ok\"\n";
|
"ticket is in status \"$mainTicketStatus\" instead of \"needs-project-ok\"\n";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
my $ticketNum = $ticket; $ticketNum =~ s%^.*ticket/(\d+).*$%$1%;
|
||||||
|
my %paymentVals;
|
||||||
|
if ($PAYMENT_NUMBER >= 2) {
|
||||||
|
open(my $logFH, "-|", $RT_CMD, "show", $ticketNum);
|
||||||
|
while (my $line = <$logFH>) {
|
||||||
|
# Note that this will take the last one used, since rt log gives ticket traffic IN ORDER.
|
||||||
|
if ($line =~ /^\s*([^:]+)\s*:(\s*.+)$/) {
|
||||||
|
my($key, $val) = ($1, $2);
|
||||||
|
$paymentVals{$key} = $val if $key =~ /(CONTRACTED NAME|PAYMENT NAME|PAYMENT METHOD)/i;
|
||||||
|
print STDERR "\"$file\": \"$ticket\": rt show $ticketNum line match: $key $val for $line" if ($VERBOSE > 7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close $logFH;
|
||||||
|
}
|
||||||
print STDERR "\"$file\": \"$ticket\": processing to payment $PAYMENT_NUMBER state... ";
|
print STDERR "\"$file\": \"$ticket\": processing to payment $PAYMENT_NUMBER state... ";
|
||||||
my $successString = ($pass) ? "success" : "failed";
|
my $successString = ($pass) ? "success" : "failed";
|
||||||
my $repositoryFile = File::Spec->catfile($PAYMENT_DIR, $mentorDate . "_" . $entity . '_' . $successString . '-report.mbox');
|
my $repositoryFile = File::Spec->catfile($PAYMENT_DIR, $mentorDate . "_" . $entity . '_' . $successString . '-report.mbox');
|
||||||
|
|
Loading…
Reference in a new issue