<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18975"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>we have freshly migrated from 3.6.6 to 3.8.8 and the following custom scrip doesn't work.</DIV>
<DIV> </DIV>
<DIV>If I comment the line 12 "return 0 unless $cf->id;", I can see that the $cf->id and $cf->Name are empty </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New">my $trans = $self->TransactionObj;<BR>my $ticket = $self->TicketObj;</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><BR><FONT face="Courier New">$RT::Logger->debug('***************************************');<BR>$RT::Logger->debug('>> trans->Type = ' . $trans->Type);</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><BR><FONT face="Courier New">if ($trans->Type eq 'CustomField') {<BR>  my $cf = new RT::CustomField($RT::SystemUser);<BR>  $cf->LoadByName(Queue => $ticket->QueueObj->id, Name => "Qualification sécurité");<BR>  ###return 0 unless $cf->id;</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">  $RT::Logger->debug('>> cf->id = ' . $cf->id);<BR>  $RT::Logger->debug('>> cf->Name = ' . $cf->Name);<BR>  $RT::Logger->debug('>> trans->Field = ' . $trans->Field);<BR>  $RT::Logger->debug('>> trans->NewValue = ' . $trans->NewValue);<BR>  $RT::Logger->debug('>> trans->OldValue = ' . $trans->OldValue);<BR>  $RT::Logger->debug('');  </FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">  if ($trans->Field == $cf->id && $trans->NewValue eq "Oui") {<BR>    $RT::Logger->debug($cf->Name . ' à OUI.');<BR>    return 1;<BR>  } else {<BR>    $RT::Logger->debug($cf->Name . ' pas à OUI.');<BR>  }</FONT></DIV>
<DIV><BR><FONT face="Courier New">}<BR>$RT::Logger->debug('***************************************');</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">return 0;</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Logger result :</DIV>
<DIV>------------------</DIV>
<DIV><FONT face="Courier New">[Fri Nov  5 13:07:14 2010] [debug]: *************************************** ((eval 5328):5)<BR>[Fri Nov  5 13:07:14 2010] [debug]: >> trans->Type = CustomField ((eval 5328):6)<BR>[Fri Nov  5 13:07:14 2010] [debug]: >> cf->id =  ((eval 5328):14)<BR>[Fri Nov  5 13:07:14 2010] [debug]: >> cf->Name =  ((eval 5328):15)<BR>[Fri Nov  5 13:07:14 2010] [debug]: >> trans->Field = 4 ((eval 5328):16)<BR>[Fri Nov  5 13:07:14 2010] [debug]: >> trans->NewValue = Non ((eval 5328):17)<BR>[Fri Nov  5 13:07:14 2010] [debug]: >> trans->OldValue = Oui ((eval 5328):18)<BR>[Fri Nov  5 13:07:14 2010] [debug]:  ((eval 5328):19)<BR>[Fri Nov  5 13:07:14 2010] [debug]:  pas à OUI. ((eval 5328):25)<BR>[Fri Nov  5 13:07:14 2010] [debug]: *************************************** ((eval 5328):28)<BR></FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanks in advance for your help.</DIV>
<DIV>Horst</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>PS</DIV>
<DIV>Sorry for my bad english...</DIV><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>
  </BODY></HTML>