[rt-users] Ticket history template not working since upgrade to RT 3.8.0

Shannon Adams shannon_adams68 at yahoo.com
Fri Aug 22 11:17:47 EDT 2008


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;
}


      



More information about the rt-users mailing list