Additional issues with CF matching.
This commit is contained in:
parent
54cd914e47
commit
2598a6f739
1 changed files with 6 additions and 6 deletions
|
@ -39,7 +39,7 @@ sub PaymentDateByTicket($$) {
|
||||||
my $date;
|
my $date;
|
||||||
while (my $payLine = <$rtPayFH>) {
|
while (my $payLine = <$rtPayFH>) {
|
||||||
chomp $payLine;
|
chomp $payLine;
|
||||||
if ($payLine =~ /[\d\-]+/) {
|
if ($payLine =~ /^\s*CF\s*.\s*{payment-$paymentNumber-sent}\s*:\s*[\d\-]+\s*$/) {
|
||||||
$date = $payLine;
|
$date = $payLine;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
@ -112,16 +112,16 @@ sub GetStatusFromTicket($) {
|
||||||
###############################################################################
|
###############################################################################
|
||||||
sub GetCustomFieldForTicket($$) {
|
sub GetCustomFieldForTicket($$) {
|
||||||
my($ticketSpec, $customField) = @_;
|
my($ticketSpec, $customField) = @_;
|
||||||
open(my $rtPayFH, "-|", "$RT_CMD", "show", "-f", 'CF.{' . $customField .'}', $ticketSpec);
|
open(my $rtCustomFH, "-|", "$RT_CMD", "show", "-f", 'CF.{' . $customField .'}', $ticketSpec);
|
||||||
my $val;
|
my $val;
|
||||||
while (my $customFieldLine = <$rtPayFH>) {
|
while (my $customFieldLine = <$rtCustomFH>) {
|
||||||
chomp $customFieldLine;
|
chomp $customFieldLine;
|
||||||
if ($customFieldLine =~ /^\s*(\S+)\s*$/) {
|
if ($customFieldLine =~ /^\s*CF\s*.\s*{$customField}\s*:\s*(\S+)\s*$/) {
|
||||||
$val = $customFieldLine;
|
$val = $1;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close $rtPayFH;
|
close $rtCustomFH;
|
||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
Loading…
Reference in a new issue