<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Kevin,<br>
<br>
<br>
Here's one we use for when the development step of a ticket (CF
"Work-State") is changed to "Review Approved":<br>
<br>
# condition execution on CF Review Process<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,<br>
         Name => "Work-State");<br>
     return 0 unless $cf->id;  <br>
     if  ($trans->Field == $cf->id &&<br>
          $trans->NewValue eq "Review Complete-Approved")<br>
          {<br>
           return 1;<br>
          }<br>
    }<br>
<br>
return 0;<br>
<br>
Just plug in your CF name and value you want and you're set. Hope this
helps.<br>
<br>
Kenn<br>
LBNL<br>
<br>
On 6/16/2009 2:53 PM, Kevin Gagel wrote:
<blockquote cite="mid:4a381448.e44.300.10cb@cnc.bc.ca" type="cite">
  <style>
 .sw_message P{margin:0px;padding:0px;}
 .sw_message {FONT-SIZE: 12pt;FONT-FAMILY:Tahoma,Arial,Helvetica,sans-serif;background:white;}
  </style>My users don't want to use priorities so they've had me
create 4 levelsfor urgency. They only want to be notified by email on
an item that hasthe highest urgency level set. So I want to setup a
custom conditionthat tests for that level and then sends an email to
the user if thatspecific level is set.<br>
  <br>
So, I have a custom field of "Urgency" which can have a value of
URGENT, High, Medium, Low, or Project.<br>
I have the template made already for the email to be sent out and
thescrip configured for it. I just don't know how to write the
customcondition to put into the scrip. How do I write the condition to
test for "URGENT" and indicate the action to send the email?<br>
  <br>
All the references I'm finding in the RT Essentials have me a bit
confused, am I supposed to right a new module to make this scrip or can
I just add the perl code to the condition (not that I know what code I
have to enter just yet).<br>
  <br>
Kevin W. Gagel<br>
Network Administrator<br>
Local 5448<br>
My blog:<br>
<a class="moz-txt-link-freetext" href="http://mail.cnc.bc.ca/blogs/gagel">http://mail.cnc.bc.ca/blogs/gagel</a><br>
My shared files:<br>
<a class="moz-txt-link-freetext" href="http://mail.cnc.bc.ca/users/gagel">http://mail.cnc.bc.ca/users/gagel</a><br>
  <br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
<a class="moz-txt-link-freetext" href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a>

Community help: <a class="moz-txt-link-freetext" href="http://wiki.bestpractical.com">http://wiki.bestpractical.com</a>
Commercial support: <a class="moz-txt-link-abbreviated" href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at <a class="moz-txt-link-freetext" href="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</a></pre>
</blockquote>
</body>
</html>