[rt-users] Scrip needed that automaticaly closes tickets with a special subject

Gene LeDuc gleduc at mail.sdsu.edu
Thu Jul 12 13:50:57 EDT 2007


Hi Forrest,

At 05:50 AM 7/12/2007, Forrest Blount wrote:
>I think you're going wrong in your custom condition.  The Transactions 
>table doesn't have a subject field...
>I think what you want is more like:
>return($self->TransactionObj->Field eq "Subject" &&
>       $self->TransactionObj->NewValue eq "HMPF");

The Transaction table of the database does not have a Subject field, but 
$self->TransactionObj->Subject() is a method that returns the subject from 
the transaction.  The conditions I gave in my original post will work if 
the typos that were added are removed.

>Thomas Hecker wrote:
>>But it still does not work. Here is what i did:
>>
>>Custom condition:
>>my $Transaction = $self->TransactionObj;
>>return $Transaction->$Transaction->Subject ='HMPF';

Typo here.  Should be:
return $Transaction->Type eq 'Correspond' && $Transaction->Subject =~ /HMPF/;

Regards,
Gene



-- 
Gene LeDuc, GSEC
Security Analyst
San Diego State University 




More information about the rt-users mailing list