Ticket history template not working since upgrade to RT 3.8.0

We have a template that we have used on many different versions of RT that will display the complete ticket history. We have it tied to a scrip that will notify an admin when a ticket is closed and show them the complete history. This stopped working after we upgraded to RT 3.8.0. Everything above the “Complete Ticket History” section displays fine. Everything under the heading is blank.
Any ideas?
Here is the template:
"{$Ticket->Subject()}" has been resolved
Original request:
< {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}&user=guest&pass=guest >
{$Ticket->Transactions->First->Content}
Complete Ticket History
{
my $resolved_message = ‘’;
my $last_content = ‘’;
my $transactions = $Ticket->Transactions;
$transactions->Limit( FIELD => ‘Type’,
VALUE => ‘Correspond’,
ENTRYAGGREGATOR => ‘OR’,
OPERATOR => ‘=’, );
$transactions->Limit( FIELD => ‘Type’,
VALUE => ‘Comment’,
ENTRYAGGREGATOR => ‘OR’,
OPERATOR => ‘=’, );
while (my $transaction = $transactions->Next) {
my $attachments = $transaction->Attachments;
while (my $message = $attachments->Next) {
next unless $message->ContentType =~
m!^(text/plain|message|text$)!i;
my $content = $message->Content;
next unless $content;
next if $last_content eq $content;
$last_content = $content;
my $subject = ($message->Subject || $Ticket->Subject);
my $wrapper = Text::Wrapper->new(columns=>70);
$content = $wrapper->wrap($content);
$resolved_message .= "From: ";
$resolved_message .= $message->CreatorObj->RealName || $message->CreatorObj->EmailAddress;
$resolved_message .= “\n”;
$resolved_message .= "Time: ";
$resolved_message .= $message->CreatedObj->AsString;
$resolved_message .= “\n”;
$resolved_message .= “\n”;
$resolved_message .= “$content\n”;
$resolved_message .= “----------------------------------------------------------------\n”;
}
}
$resolved_message;
}

I upgraded to 3.8.1 this weekend and we still cannot see a complete ticket history when a ticket is closed using the template below. Is there updated code I can use in this template that will list the complete ticket history - all comments and replies?

Thanks,
Shannon----- Original Message ----
From: Shannon Adams shannon_adams68@yahoo.com
To: rt-users@lists.bestpractical.com
Sent: Friday, August 22, 2008 11:17:47 AM
Subject: Ticket history template not working since upgrade to RT 3.8.0

We have a template that we have used on many different versions of RT that will display the complete ticket history. We have it tied to a scrip that will notify an admin when a ticket is closed and show them the complete history. This stopped working after we upgraded to RT 3.8.0. Everything above the “Complete Ticket History” section displays fine. Everything under the heading is blank.
Any ideas?
Here is the template:
Subject: Resolved: {$Ticket->Subject}
“{$Ticket->Subject()}” has been resolved
Original request:
< {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}&user=guest&pass=guest >
{$Ticket->Transactions->First->Content}
Complete Ticket History
{
my $resolved_message = ‘’;
my $last_content = ‘’;
my $transactions = $Ticket->Transactions;
$transactions->Limit( FIELD => ‘Type’,
VALUE => ‘Correspond’,
ENTRYAGGREGATOR => ‘OR’,
OPERATOR => ‘=’, );
$transactions->Limit( FIELD => ‘Type’,
VALUE => ‘Comment’,
ENTRYAGGREGATOR => ‘OR’,
OPERATOR => ‘=’, );
while (my $transaction = $transactions->Next) {
my $attachments = $transaction->Attachments;
while (my $message = $attachments->Next) {
next unless $message->ContentType =~
m!^(text/plain|message|text$)!i;
my $content = $message->Content;
next unless $content;
next if $last_content eq $content;
$last_content = $content;
my $subject = ($message->Subject || $Ticket->Subject);
my $wrapper = Text::Wrapper->new(columns=>70);
$content = $wrapper->wrap($content);
$resolved_message .= "From: ";
$resolved_message .= $message->CreatorObj->RealName || $message->CreatorObj->EmailAddress;
$resolved_message .= “\n”;
$resolved_message .= "Time: ";
$resolved_message .= $message->CreatedObj->AsString;
$resolved_message .= “\n”;
$resolved_message .= “\n”;
$resolved_message .= “$content\n”;
$resolved_message .= “----------------------------------------------------------------\n”;
}
}
$resolved_message;
}

I turned on debugging and I keep getting the follow error in the log:

[Mon Aug 25 18:06:21 2008] [error]: Scrip 226 IsApplicable failed: Global symbol “$correspond” requires explicit package name at (eval 477) line 8. (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:64)

Can translate this for me and also let me know how to correct it? I hope that this is the reason for the issue below.

Thanks,
Shannon----- Original Message ----
From: Shannon Adams shannon_adams68@yahoo.com
To: rt-users@lists.bestpractical.com
Sent: Monday, August 25, 2008 11:52:42 AM
Subject: Re: Ticket history template not working since upgrade to RT 3.8.0

I upgraded to 3.8.1 this weekend and we still cannot see a complete ticket history when a ticket is closed using the template below. Is there updated code I can use in this template that will list the complete ticket history - all comments and replies?

Thanks,
Shannon

----- Original Message ----
From: Shannon Adams shannon_adams68@yahoo.com
To: rt-users@lists.bestpractical.com
Sent: Friday, August 22, 2008 11:17:47 AM
Subject: Ticket history template not working since upgrade to RT 3.8.0

We have a template that we have used on many different versions of RT that will display the complete ticket history. We have it tied to a scrip that will notify an admin when a ticket is closed and show them the complete history. This stopped working after we upgraded to RT 3.8.0. Everything above the “Complete Ticket History” section displays fine. Everything under the heading is blank.
Any ideas?
Here is the template:
Subject: Resolved: {$Ticket->Subject}
“{$Ticket->Subject()}” has been resolved
Original request:
< {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}&user=guest&pass=guest >
{$Ticket->Transactions->First->Content}
Complete Ticket History
{
my $resolved_message = ‘’;
my $last_content = ‘’;
my $transactions = $Ticket->Transactions;
$transactions->Limit( FIELD => ‘Type’,
VALUE => ‘Correspond’,
ENTRYAGGREGATOR => ‘OR’,
OPERATOR => ‘=’, );
$transactions->Limit( FIELD => ‘Type’,
VALUE => ‘Comment’,
ENTRYAGGREGATOR => ‘OR’,
OPERATOR => ‘=’, );
while (my $transaction = $transactions->Next) {
my $attachments = $transaction->Attachments;
while (my $message = $attachments->Next) {
next unless $message->ContentType =~
m!^(text/plain|message|text$)!i;
my $content = $message->Content;
next unless $content;
next if $last_content eq $content;
$last_content = $content;
my $subject = ($message->Subject || $Ticket->Subject);
my $wrapper = Text::Wrapper->new(columns=>70);
$content = $wrapper->wrap($content);
$resolved_message .= "From: ";
$resolved_message .= $message->CreatorObj->RealName || $message->CreatorObj->EmailAddress;
$resolved_message .= “\n”;
$resolved_message .= "Time: ";
$resolved_message .= $message->CreatedObj->AsString;
$resolved_message .= “\n”;
$resolved_message .= “\n”;
$resolved_message .= “$content\n”;
$resolved_message .= “----------------------------------------------------------------\n”;
}
}
$resolved_message;
}