[rt-users] custom condition not working when checking requestor SOLVED

a.smith at ukgrid.net a.smith at ukgrid.net
Mon May 3 12:27:48 EDT 2010


Hi,

   thanks for the help Chris, Ive got this working now. The working code is:

my $transactionType = $self->TransactionObj->Type;
my $ticketRequestor = lc($self->TicketObj->RequestorAddresses);

if ($transactionType eq 'Create' &&
   $ticketRequestor ne $self->TicketObj->QueueObj->CorrespondAddress()) {
   return 1;
}
return 0;


Previously Id lifted some code from an example and was using  
$Queue->CorrespondAddress which isnt valid unless you´ve already  
defined my Queue somewhere. So Ive updated to use the full syntax as  
per above.
I got a bit confused between the return codes, initially thinking 0  
was a clean exit (ie good) and not true as it acutally means.
Anyway all good now!

thanks Andy.






More information about the rt-users mailing list