LedgerTagFromTicket: handle that CF line might be first
The 'CF.{ledger-tags}: ' portion appears on the first line of output, so that
must be handled.
			
			
This commit is contained in:
		
							parent
							
								
									def7498189
								
							
						
					
					
						commit
						54cd914e47
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -53,8 +53,10 @@ sub LedgerTagFromTicket($$) { | |||
|   open(my $rtPayFH, "-|", "$RT_CMD", "show", "-f", 'CF.{ledger-tags}', $ticketSpec); | ||||
|   my $tagValue; | ||||
|   while (my $tagsLine = <$rtPayFH>) { | ||||
|     print STDERR "Tag Lookup for \"$ticketSpec\" for \"$tag\", searching this line for it: $tagsLine" | ||||
|       if ($VERBOSE > 6); | ||||
|     chomp $tagsLine; | ||||
|     if ($tagsLine =~ /^\s*;?$tag\s*:\s*(.+)\s*$/i) { | ||||
|     if ($tagsLine =~ /^(?:\s*|\s*CF[^:]+\s*}\s*:\s*);?$tag\s*:\s*(.+)\s*$/i) { | ||||
|       $tagValue = $1; | ||||
|       last; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Bradley M. Kuhn
						Bradley M. Kuhn