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; | ||||
|   while (my $payLine = <$rtPayFH>) { | ||||
|     chomp $payLine; | ||||
|     if ($payLine =~ /[\d\-]+/) { | ||||
|     if ($payLine =~ /^\s*CF\s*.\s*{payment-$paymentNumber-sent}\s*:\s*[\d\-]+\s*$/) { | ||||
|       $date = $payLine; | ||||
|       last; | ||||
|     } | ||||
|  | @ -112,16 +112,16 @@ sub GetStatusFromTicket($) { | |||
| ############################################################################### | ||||
| sub GetCustomFieldForTicket($$) { | ||||
|   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; | ||||
|   while (my $customFieldLine = <$rtPayFH>) { | ||||
|   while (my $customFieldLine = <$rtCustomFH>) { | ||||
|     chomp $customFieldLine; | ||||
|     if ($customFieldLine =~ /^\s*(\S+)\s*$/) { | ||||
|       $val = $customFieldLine; | ||||
|     if ($customFieldLine =~ /^\s*CF\s*.\s*{$customField}\s*:\s*(\S+)\s*$/) { | ||||
|       $val = $1; | ||||
|       last; | ||||
|     } | ||||
|   } | ||||
|   close $rtPayFH; | ||||
|   close $rtCustomFH; | ||||
|   return $val; | ||||
| } | ||||
| ############################################################################### | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Bradley M. Kuhn
						Bradley M. Kuhn