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
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to