<!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">
Paul,<br>
<br>
<br>
Are yosaying it NEVER triggered? If so, then I suggest you look at
your logs. Also, double check your values. Everything is
case-sensitive. If the value you are checking for doesn't exist in the
Custom Field EXACTLY as what you are checking for, it won't trigger.
Otherwise, the code looks good. It should work.<br>
You did NOT put in the default Return 0; at the end. That should be
there so that the scrip doesn't trigger if NONE of the conditions
match. But that wouldn't keep it FROM triggering. I think it is a false
value. Let me know.<br>
<br>
Kenn<br>
LBNL<br>
<br>
On 3/13/2009 12:00 PM, Paul Vlaar wrote:
<blockquote cite="mid:49BAAD4F.1050601@isc.org" type="cite">
<pre wrap="">On Fri Mar 13 2009 19:58:17 GMT+0100 (CET), Paul Vlaar wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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 => "Contract");
return 1 unless $cf->id;
</pre>
</blockquote>
<pre wrap=""><!---->
This is actually a "return 0", but I had it set to 1 for debugging.
</pre>
<blockquote type="cite">
<pre wrap=""> if ($trans->Field == $cf->id && $trans->NewValue eq "expiring") {
return 1;
}
}
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>