On Tue, Jun 29, 2010 at 10:09:19AM +0200, Horst Kriegers wrote: > the following scrip works only "On transaction" but not wen a new ticket > is created. > What is wrong ?
Your condition says "only work when this is a custom field change", it doesn't consider Create types at all. -kevin > - Condition : User Defined > - Custom condition : > > my $trans = $self->TransactionObj; > my $ticket = $self->TicketObj; > > if ($trans->Type eq 'CustomField') { > my $cf = new RT::CustomField($RT::SystemUser); > $cf->LoadByName(Queue => $ticket->QueueObj->id, Name => "Qualification > securite"); > return 0 unless $cf->id; > > if ($trans->Field == $cf->id && $trans->NewValue eq "Oui") { > return 1; > } > > } > return 0;
pgprCEDbwiqQu.pgp
Description: PGP signature
Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com