Debugging output and skip blank lines, with comment.
This commit is contained in:
parent
6b8f3fac77
commit
4b0cdad67e
1 changed files with 5 additions and 1 deletions
|
@ -17,10 +17,14 @@ my($VERBOSE, $INTERACTIVE, $RT_CMD, $SVN_CMD);
|
||||||
sub TicketIDsReadyForPayment () {
|
sub TicketIDsReadyForPayment () {
|
||||||
my @ticketSpecs;
|
my @ticketSpecs;
|
||||||
open(my $rtLsFH, "-|", "$RT_CMD", "ls", "-i", "Status = 'ready-for-payment'");
|
open(my $rtLsFH, "-|", "$RT_CMD", "ls", "-i", "Status = 'ready-for-payment'");
|
||||||
|
print "Running: rt ls -i Status=ready-for-payment\n" if ($VERBOSE >= 10);
|
||||||
while (my $lsLine = <$rtLsFH>) {
|
while (my $lsLine = <$rtLsFH>) {
|
||||||
|
print "rt ls line from Ready for payment search: $lsLine" if ($VERBOSE >= 10);
|
||||||
chomp $lsLine;
|
chomp $lsLine;
|
||||||
push(@ticketSpecs, $lsLine);
|
next if $lsLine =~ /^\s*$/; # There are sometimes blank lines in the rt ls -i output,
|
||||||
|
push(@ticketSpecs, $lsLine); # particularly with 0 results, and no empty strings go on this list
|
||||||
}
|
}
|
||||||
|
print "Done: rt ls -i Status=ready-for-payment\n" if ($VERBOSE >= 10);
|
||||||
close $rtLsFH;
|
close $rtLsFH;
|
||||||
return @ticketSpecs;
|
return @ticketSpecs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue