Problem w/ Including History in closed message

I am using the following template:

Dear customer,

your issue regarding

   "{$Ticket->Subject()}",

has been resolved in our ticket system. See below for history of this ticket.

If you have any further questions or concerns, please reply to this
message to reopen the ticket.

regards

{$Ticket->OwnerObj->RealName || $Ticket->OwnerObj->Name}
your-company-fooprint

Your initial request was

{$Ticket->Transactions->First->Content()}

Complete Ticket History

{
my $resolved_message = ‘’;
my $last_content = ‘’;

my $transactions = $Ticket->Transactions;
$transactions->Limit( FIELD => ‘Type’, VALUE => ‘Correspond’ );

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

Common Information

There is no need to reply to this message unless you want to RE-OPEN your
ticket with ID [{$rtname} #{$Ticket->id}].

Taken from the wiki, thanks to the people who made it, but I am having a problem w/ the closing ticket.

It shows the following:

Dear customer,

your issue regarding

   "Problems w/ Grass Growing outside",

has been resolved in our ticket system. See below for history of this ticket.

If you have any further questions or concerns, please reply to this
message to reopen the ticket.

regards

Nobody in particular
your-company-fooprint

Your initial request was

The Grass is growing outside
Please stop it

Complete Ticket History

Common Information

There is no need to reply to this message unless you want to RE-OPEN your
ticket with ID [Readwriterun.com #24].

Which is great but it does not show the text I typed in when I closed the ticket. ANy help would be great, thanks in advance

Further update on this and I don’t understand why this is different,
pardon my stupidty.

When I reply to a Ticket, RT defaults to Reply to requestors. I want
the Reply to Requestors set as the default when I close the ticket as
well.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jonathan
Jesse
Sent: Friday, July 29, 2005 2:46 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Problem w/ Including History in closed message

I am using the following template:
Subject: Resolved: {$Ticket->Subject}

Dear customer,

your issue regarding

   "{$Ticket->Subject()}",

has been resolved in our ticket system. See below for history of this
ticket.

If you have any further questions or concerns, please reply to this
message to reopen the ticket.

regards

{$Ticket->OwnerObj->RealName || $Ticket->OwnerObj->Name}
your-company-fooprint

Your initial request was

{$Ticket->Transactions->First->Content()}

Complete Ticket History

{
my $resolved_message = ‘’;
my $last_content = ‘’;

my $transactions = $Ticket->Transactions;
$transactions->Limit( FIELD => ‘Type’, VALUE => ‘Correspond’ );

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

Common Information

There is no need to reply to this message unless you want to RE-OPEN
your
ticket with ID [{$rtname} #{$Ticket->id}].

Taken from the wiki, thanks to the people who made it, but I am having a
problem w/ the closing ticket.

It shows the following:

Dear customer,

your issue regarding

   "Problems w/ Grass Growing outside",

has been resolved in our ticket system. See below for history of this
ticket.

If you have any further questions or concerns, please reply to this
message to reopen the ticket.

regards

Nobody in particular
your-company-fooprint

Your initial request was

The Grass is growing outside
Please stop it

Complete Ticket History

Common Information

There is no need to reply to this message unless you want to RE-OPEN
your
ticket with ID [Readwriterun.com #24].

Which is great but it does not show the text I typed in when I closed
the ticket. ANy help would be great, thanks in advance

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

Be sure to check out the RT Wiki at http://wiki.bestpractical.com