<div dir="ltr">Hi,<div><br></div><div style>I don't remember $self being ever available in Templates, instead of <span style="font-family:Arial">$self->CurrentUser use $Transaction->CurrentUser or just RT->SystemUser.</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 31, 2013 at 12:43 AM, Cena, Stephen (ext. 300) <span dir="ltr"><<a href="mailto:SJC@qvii.com" target="_blank">SJC@qvii.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<div><span><font face="Arial">I have this template
for when a ticket is stolen:</font></span></div>
<div><span></span><span><font face="Arial"></font></span> </div>
<div><span><font face="Arial">To: { my $old_owner
= RT::User->new( $self->CurrentUser );<br>
$old_owner->Load( $Transaction->OldValue
);<br> $old_owner->EmailAddress();
}<br>Subject: Ticket #{ $Ticket->Id() } taken by {
$Ticket->OwnerObj->Name() }</font></span></div>
<div><font face="Arial"></font> </div>
<div><span><font face="Arial">A ticket you
owned:</font></span></div>
<div><font face="Arial"></font> </div>
<div><span><font face="Arial">{
$Ticket->Subject() }</font></span></div>
<div><font face="Arial"></font> </div>
<div><span><font face="Arial">has been taken by {
$Ticket->OwnerObj->Name()}.</font></span></div>
<div><font face="Arial"></font> </div>
<div><span><font face="Arial">{ $RT::WebURL
}Ticket/Display.html?id={ $Ticket->Id }</font></span></div>
<div><span><font face="Arial"></font></span> </div>
<div><span><font face="Arial">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:</font></span></div>
<div><span><font face="Arial"></font></span> </div>
<div><span><font face="Arial">[Thu May 30 20:20:45
2013] [info]: <<a href="mailto:rt-4.0.13-1532-1369945245-1205.4-12-0@DOMAIN-REDACTED.com" target="_blank">rt-4.0.13-1532-1369945245-1205.4-12-0@DOMAIN-REDACTED.com</a>>
#4/148 - Scrip 12 On Take
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:285)<br>[Thu May 30 20:20:45 2013]
[info]: <<a href="mailto:rt-4.0.13-1532-1369945245-1205.4-12-0@DOMAIN-REDACTED.com" target="_blank">rt-4.0.13-1532-1369945245-1205.4-12-0@DOMAIN-REDACTED.com</a>>
sent Bcc: <a href="mailto:adam@DOMAIN-REDACTED.com" target="_blank">adam@DOMAIN-REDACTED.com</a>
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:316)<br>[Thu May 30 20:25:52 2013]
[info]: Successful login for <a href="mailto:adam@DOMAIN-REDACTED.com" target="_blank">adam@DOMAIN-REDACTED.com</a>
from IP-REDACTED (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:758)<br>[Thu May
30 20:26:20 2013] [error]: Template parsing error: Can't call method
"CurrentUser" on an undefined value at template line 1.</font></span></div>
<div> </div>
<div><span><font face="Arial">Stack:<br>
[template:1]<br> [/opt/rt4/sbin/../lib/RT/Template.pm:479]<br>
[/opt/rt4/sbin/../lib/RT/Template.pm:435]<br>
[/opt/rt4/sbin/../lib/RT/Template.pm:363]<br>
[/opt/rt4/sbin/../lib/RT/Template.pm:343]<br>
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:138]<br>
[/opt/rt4/sbin/../lib/RT/Action/Notify.pm:69]<br>
[/opt/rt4/sbin/../lib/RT/ScripAction.pm:226]<br>
[/opt/rt4/sbin/../lib/RT/Scrip.pm:448]<br>
[/opt/rt4/sbin/../lib/RT/Scrips.pm:234]<br>
[/opt/rt4/sbin/../lib/RT/Transaction.pm:179]<br>
[/opt/rt4/sbin/../lib/RT/Record.pm:1504]<br>
[/opt/rt4/sbin/../lib/RT/Ticket.pm:3051]<br>
[/opt/rt4/sbin/../lib/RT/Ticket.pm:3115]<br>
[/opt/rt4/share/html/Ticket/Display.html:153]<br>
[/opt/rt4/share/html/Ticket/autohandler:66]<br>
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:635]<br>
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:335]<br>
[/opt/rt4/share/html/autohandler:53]
(/opt/rt4/sbin/../lib/RT/Template.pm:474)<br></font></span></div>
<div><span><font face="Arial">What
happened?</font></span></div></div>
<br><br>
<br>
--<br>
RT Training in Seattle, June 19-20: <a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards, Ruslan.
</div>