[rt-users] "On Steal" email causing errors

Cena, Stephen (ext. 300) SJC at qvii.com
Thu May 30 16:43:55 EDT 2013


I have this template for when a ticket is stolen:
 
To: { my $old_owner = RT::User->new( $self->CurrentUser );
      $old_owner->Load( $Transaction->OldValue );
      $old_owner->EmailAddress(); }
Subject: Ticket #{ $Ticket->Id() } taken by { $Ticket->OwnerObj->Name()
}
 
A ticket you owned:
 
{ $Ticket->Subject() }
 
has been taken by { $Ticket->OwnerObj->Name()}.
 
{ $RT::WebURL }Ticket/Display.html?id={ $Ticket->Id }
 
I've been using it since around RT 4.0.6 & all has been well. I'm
deploying a new 4.0.13 system & copied the Scrip and Template intot he
new system. When someone does a Steal, it works inside of RT but I get
the following error in the logs:
 
[Thu May 30 20:20:45 2013] [info]:
<rt-4.0.13-1532-1369945245-1205.4-12-0 at DOMAIN-REDACTED.com> #4/148 -
Scrip 12 On Take (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:285)
[Thu May 30 20:20:45 2013] [info]:
<rt-4.0.13-1532-1369945245-1205.4-12-0 at DOMAIN-REDACTED.com> sent  Bcc:
adam at DOMAIN-REDACTED.com
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:316)
[Thu May 30 20:25:52 2013] [info]: Successful login for
adam at DOMAIN-REDACTED.com from IP-REDACTED
(/opt/rt4/sbin/../lib/RT/Interface/Web.pm:758)
[Thu May 30 20:26:20 2013] [error]: Template parsing error: Can't call
method "CurrentUser" on an undefined value at template line 1.
 
Stack:
  [template:1]
  [/opt/rt4/sbin/../lib/RT/Template.pm:479]
  [/opt/rt4/sbin/../lib/RT/Template.pm:435]
  [/opt/rt4/sbin/../lib/RT/Template.pm:363]
  [/opt/rt4/sbin/../lib/RT/Template.pm:343]
  [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:138]
  [/opt/rt4/sbin/../lib/RT/Action/Notify.pm:69]
  [/opt/rt4/sbin/../lib/RT/ScripAction.pm:226]
  [/opt/rt4/sbin/../lib/RT/Scrip.pm:448]
  [/opt/rt4/sbin/../lib/RT/Scrips.pm:234]
  [/opt/rt4/sbin/../lib/RT/Transaction.pm:179]
  [/opt/rt4/sbin/../lib/RT/Record.pm:1504]
  [/opt/rt4/sbin/../lib/RT/Ticket.pm:3051]
  [/opt/rt4/sbin/../lib/RT/Ticket.pm:3115]
  [/opt/rt4/share/html/Ticket/Display.html:153]
  [/opt/rt4/share/html/Ticket/autohandler:66]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:635]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:335]
  [/opt/rt4/share/html/autohandler:53]
(/opt/rt4/sbin/../lib/RT/Template.pm:474)

What happened?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130530/0ce85052/attachment.htm>


More information about the rt-users mailing list