Correct rt show output; add verbosity there.
Note that "rt show ticket/NUMBER" does not give the entire ticket traffic, whereas "rt show NUMBER" does.
This commit is contained in:
		
							parent
							
								
									c1fdf916d9
								
							
						
					
					
						commit
						2e8f9c42d1
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -28,9 +28,10 @@ sub TicketIDsReadyForPayment () { | |||
| sub FindMostRecentPaymentMethodForTicket ($) { | ||||
|   my($ticketSpec) = @_; | ||||
|   my $paymentMethod; | ||||
| 
 | ||||
|   open(my $rtShowFH, "-|", "$RT_CMD", "ls", "-i", "Status = 'ready-for-payment'"); | ||||
|   $ticketSpec =~ s%^\s*ticket\s*/\s*%%; | ||||
|   open(my $rtShowFH, "-|", "$RT_CMD", "show", $ticketSpec); | ||||
|   while (my $showLine = <$rtShowFH>) { | ||||
|     print STDERR "rt show line for $ticketSpec: $showLine" if ($VERBOSE >= 10); | ||||
|     $paymentMethod = $1 | ||||
|       if ($showLine =~ /\s+PAYMENT\s+METHOD\s*:\s*(.*?)\s*$/); | ||||
|     # don't 'last' when found as we want the last one. | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Bradley M. Kuhn
						Bradley M. Kuhn