Improve output.
This commit is contained in:
parent
2b06c9f8bd
commit
d352fc5322
1 changed files with 4 additions and 3 deletions
|
@ -234,6 +234,7 @@ foreach my $ticket (@processList) {
|
||||||
|
|
||||||
open(my $logFH, "-|", $RT_CMD, "show", $ticketNum);
|
open(my $logFH, "-|", $RT_CMD, "show", $ticketNum);
|
||||||
while (my $line = <$logFH>) {
|
while (my $line = <$logFH>) {
|
||||||
|
print STDERR "\"$ticket\": rt show $ticketNum line evaluation: $line" if ($VERBOSE > 8);
|
||||||
if ($line =~ /^\s*([^:]+)\s*:\s*(.+)$/) {
|
if ($line =~ /^\s*([^:]+)\s*:\s*(.+)$/) {
|
||||||
my($key, $val) = ($1, $2);
|
my($key, $val) = ($1, $2);
|
||||||
# Note that this will take the last one used, since rt log gives ticket traffic IN ORDER.
|
# Note that this will take the last one used, since rt log gives ticket traffic IN ORDER.
|
||||||
|
@ -262,7 +263,7 @@ foreach my $ticket (@processList) {
|
||||||
}
|
}
|
||||||
close $logFH;
|
close $logFH;
|
||||||
if (not defined $pass) {
|
if (not defined $pass) {
|
||||||
print STDERR "\"$ticket\": Skipping: pass/fail information not found" ;
|
print STDERR "\"$ticket\": Skipping: pass/fail information not found\n" ;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($pass and not defined $mentorDate) {
|
if ($pass and not defined $mentorDate) {
|
||||||
|
@ -270,7 +271,7 @@ foreach my $ticket (@processList) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($pass and not defined $approvalTag) {
|
if ($pass and not defined $approvalTag) {
|
||||||
print STDERR "\"$ticket\": Skipping: there was a pass here for this payment, but unable to the attachment number of the approval tag." ;
|
print STDERR "\"$ticket\": Skipping: there was a pass here for this payment, but unable to the attachment number of the approval tag.\n" ;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
my $completedInternshipField = GetCustomFieldForTicket($ticket, "completed-internship");
|
my $completedInternshipField = GetCustomFieldForTicket($ticket, "completed-internship");
|
||||||
|
@ -396,7 +397,7 @@ foreach my $ticket (@processList) {
|
||||||
foreach my $key (keys %paymentVals) {
|
foreach my $key (keys %paymentVals) {
|
||||||
print $paymentValsFH sprintf(" %20s: ", $key), "$paymentVals{$key}\n";
|
print $paymentValsFH sprintf(" %20s: ", $key), "$paymentVals{$key}\n";
|
||||||
}
|
}
|
||||||
print $paymentValsFH sprintf(" %20s", 'TOTAL AMOUNT'), "$rightA\n\n LEDGER ENTRY:\n";
|
print $paymentValsFH sprintf(" %20s: ", 'TOTAL AMOUNT'), "$rightA\n\n LEDGER ENTRY:\n";
|
||||||
|
|
||||||
my $ledgerEntryFile = File::Spec->catfile($PAYMENT_DIR, "entry.ledger");
|
my $ledgerEntryFile = File::Spec->catfile($PAYMENT_DIR, "entry.ledger");
|
||||||
open(my $ledgerEntryFH, ">>", $ledgerEntryFile);
|
open(my $ledgerEntryFH, ">>", $ledgerEntryFile);
|
||||||
|
|
Loading…
Reference in a new issue