[rt-devel] Scrip Action

Ruslan U. Zakirov cubic at acronis.ru
Mon Nov 10 04:03:19 EST 2003


	Hello. Richard.
G. Richard Bellamy wrote:
> I'm attempting a very basic Scrip, as follows:
>  
> ===============================
> Description :Set Priority
>  
> Condition   :On Create 
>  
> Action      :User Defined
>  
> Custom action preparation code:
> $RT::Logger->info($Transaction->CreatorObj->EmailAddress);
> ($Transaction->CreatorObj->EmailAddress =~ /rbellamy\@pteradigm\.com/i)
> ? 1 : 0;  
You have to use:
$self->TransactionObj to get Current Transaction object, also:
$self->TicketObj
$self->ScripObj
$self->TemplateObj
$self->Argument
$self->Type

>  
> Custom action cleanup code:
> $Ticket->SetPriority("50");  
>  
> Template    :Global template: Blank
> ===============================
> 
> And I receive the following error in the error log (note that the call
> to the $RT::Logger seems to be ignored):
> 
> ===============================
> Nov 10 00:25:42 support RT: RT::Scrip=HASH(0x9bcb548): Couldn't prepare
> User Defined (/opt/rt3/lib/RT/Scrip_Overlay.pm:338)
> ===============================
Encrease log level or may be other records was piped to another log file 
with syslog. I use RT's logtofile, it's better to track down such things.
> 
> This seems to indicate that it's my custom action preparation code
> that's killing the scrip. I can't seem to find anything that _doesn't_
> throw the error.
> 
> Any help would be greatly appreciated.
	Best regards. Ruslan.





More information about the Rt-devel mailing list