I can use the exact template in a 3.7.2 environment without any issues.

The problem area in the template which produces no output in 3.8.1 (the section 
is just blank) is:

----------------------------------------------------------------
  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 .= "Subject: ";
     $resolved_message .= $subject;
     $resolved_message .= "\n";
     $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;
}



Anyone have any ideas, or workarounds?

Thanks

From: John Edwards
Sent: Tuesday, November 18, 2008 12:35 PM
To: '[email protected]'
Subject: Problem with AddTicketHistoryToMail Template

I've tried using the template from 
http://wiki.bestpractical.com/view/AddTicketHistoryToMail and the entire 
template works perfectly with the exception of displaying the ticket history.

This is a clean 3.8.1 install, no migration and only one queue.  I get no 
errors and no other issues with the installation, the history displays in the 
web interface perfectly.

Thanks


-        John




_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to