[rt-users] Problem with custom Template

Brian Lawson blawson at samhouston.net
Mon Mar 29 10:30:19 EDT 2010


Still a newbie.  Using RT 3.8.2

I've been playing around with making an OnOwnerChangeNotifyOwner scrip
and I am having parsing errors.

I am using just a NotifyOwner Action with a custom template with the
stage as TransactionCreate.  

Here is my template:

To: { my $old_owner = RT::User($RT::SystemUser);
$old_owner->Load( $Transaction->OldValue );
$old_owner->EmailAddress || $Transaction->OldValue}
Subject: [{$rtname} Ticket #{ $Ticket->Id( ) } Owner Change Notification

A ticket that you owned:
   {Subject: $Ticket->Subject()}

is now owned by 
   {$Ticket->OwnerObj->Name()}


{$RT->WebURL}Ticket/Display.html?id={$Ticket->Id}

I'm seeing the following error in the rt.log:

[error]: Template parsing error: Undefined subroutine &RT::User called
at template line 1. 
Stack:
  [template:1]
  [/opt/rt3/bin/../lib/RT/Template_Overlay.pm:425]
  [/opt/rt3/bin/../lib/RT/Template_Overlay.pm:332]
  [/opt/rt3/bin/../lib/RT/Template_Overlay.pm:312]
  [/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:157]
  [/opt/rt3/bin/../lib/RT/Action/Notify.pm:69]
  [/opt/rt3/bin/../lib/RT/ScripAction_Overlay.pm:230]
  [/opt/rt3/bin/../lib/RT/Scrip_Overlay.pm:435]
  [/opt/rt3/bin/../lib/RT/Scrips_Overlay.pm:240]
  [/opt/rt3/bin/../lib/RT/Transaction_Overlay.pm:169]
  [/opt/rt3/bin/../lib/RT/Record.pm:1456]
  [/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:2796]
  [/opt/rt3/bin/../lib/RT/Interface/Web.pm:1068]
  [/opt/rt3/share/html/Ticket/ModifyPeople.html:75]
  [/opt/rt3/share/html/autohandler:311]
(/opt/rt3/bin/../lib/RT/Template_Overlay.pm:420)

Please help,
Brian

This communication, together with any attachments hereto or links contained herein, is for the sole use of the intended recipient(s) and may contain information that is confidential or legally protected. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying, dissemination, distribution or use of this communication is STRICTLY PROHIBITED. If you have received this communication in error, please notify the sender immediately by return e-mail message and delete the original and all copies of the communication, along with any attachments hereto or links herein, from your system.




More information about the rt-users mailing list