I have a scrip that should be adding the owner as an AdminCC on ticket 
create. It works fine. However, if a ticket is created with no owner 
set, it sets an AdminCC as Nobody, which is annoying.

I threw an if statement in there to try to handle it, but I am doing 
something wrong.

  my $admincclist = $self->TicketObj->AdminCc;

  my $Owner = $self->TicketObj->OwnerObj;

if ( $Owner ne "Nobody"){
  $admincclist->AddMember($Owner->Id);
}

$Owner must not really be the string nobody, because Nobody is still 
being added as an AdminCC. Any suggestions on what I should be looking 
for instead?

Second, is there a good way to debug scrips? I feel like I'm just 
feeling around in the dark and don't know how to tell if they're really 
working, or what the contents of variables are, etc. If I was writing 
straight perl code I could have it print the content of $Owner so I 
could see what was in there.

_______________________________________________
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