Hort,<br><br>Try this:<br><br># Check for Ticket Status changed to "Created"<br><br>my $trans = $self->TransactionObj;<br><br>return 0 unless ($trans->Type eq "Status" &&<br> $trans->NewValue eq "Create");<br>
<br>Then follow with your code.<br><br>Kenn<br>LBNL<br><br><div class="gmail_quote">On Fri, Nov 5, 2010 at 7:25 AM, Horst Kriegers <span dir="ltr"><<a href="mailto:Horst.Kriegers@loro.ch">Horst.Kriegers@loro.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="margin: 4px 4px 1px; font: 10pt Tahoma;">
<div>Hello,</div>
<div> </div>
<div>sorry, I don't understand how to consider the Ticket Creating.<br>Can you assist me ?</div>
<div> </div>
<div>Thanks a lot</div>
<div>Horst<br><br>>>> Le Mardi, 29. Juin 2010 à 17:01, Kevin Falcone <<a href="mailto:falcone@bestpractical.com" target="_blank">falcone@bestpractical.com</a>> a écrit :<br></div>
<table style="margin: 0px 0px 0px 15px; font-size: 1em;" bgcolor="#f3f3f3" border="0">
<tbody>
<tr>
<td>
<div style="border-left: 1px solid rgb(5, 5, 5); padding-left: 7px;">On Tue, Jun 29, 2010 at 10:09:19AM +0200, Horst Kriegers wrote:<br>> the following scrip works only "On transaction" but not wen a new ticket is created.<br>
> What is wrong ?<br><br>Your condition says "only work when this is a custom field change", it<br>doesn't consider Create types at all.<br><br>-kevin<br><br>> - Condition : User Defined<br>> - Custom condition :<br>
> <br>> my $trans = $self->TransactionObj;<br>> my $ticket = $self->TicketObj;<br>> <br>> if ($trans->Type eq 'CustomField') {<br>> my $cf = new RT::CustomField($RT::SystemUser);<br>
> $cf->LoadByName(Queue => $ticket->QueueObj->id, Name => "Qualification securite");<br>> return 0 unless $cf->id;<br>> <br>> if ($trans->Field == $cf->id && $trans->NewValue eq "Oui") {<br>
> return 1;<br>> }<br>> <br>> }<br>> return 0;<br></div></td></tr></tbody></table><br>
<p>
<font face="Arial" size="2">
_______________________________________________________________________ </font>
</p>
<p align="left">
<font face="Arial" size="2">Le contenu de ce courriel est uniquement
réservé à la personne ou l'organisme à qui il est destiné. Si vous
n'êtes pas le destinataire prévu, veuillez nous en informer au plus vite
et détruire le présent courriel. Dans ce cas, il ne vous est pas permis
de copier ce courriel, de le distribuer ou de l'utiliser de quelque
manière que ce soit.
</font> </p>
<p align="left">
<font face="Arial" size="2">
_______________________________________________________________________ </font>
</p>
<p>
<font face="Arial" size="2">The content of this e-mail is intended only
and solely for the use of the named recipient or organisation. If you
are not the named recipient, please inform us immediately and delete the
present e-mail. In this case, you are nor allowed to copy, distribute or
use this e-mail in any way.
</font> </p>
<p>
<font face="Arial" size="2">
_______________________________________________________________________ </font>
</p>
</div>
</blockquote></div><br>