[rt-users] New Ticket In Queue Alerts

Stephen Turner sturner at MIT.EDU
Wed Aug 30 14:11:24 EDT 2006


At Wednesday 8/30/2006 01:07 PM, John McCoy wrote:
>I took this one step further and checked to make sure no owner had 
>been defined first
>
>  # Nobody is ID 10 on our system
>  return 0 unless $self->TicketObj->Owner =~ /^10$/i;

[ Isn't  "=~ /^10$/i " a complicated way of writing "== 10" ? ]

If you don't like hard-coding the Id for Nobody, you can also do this 
comparison:

   return 0 unless $self->TicketObj->OwnerObj->Id == $RT::Nobody->Id;

Steve 




More information about the rt-users mailing list