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 <[EMAIL PROTECTED]> To: [email protected] 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; } _______________________________________________ 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
