Alister West

home is where your code is ...

Perl - Request Tracker - Global Templates

Admin Comment with History

Force history of the ticket in the comment. I used this in conjunction with a custom scrip "On resolve, Notify Accounts Group with Admin Comments with History".

Reply-To: { $Ticket->QueueObj->CommentAddress }
Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\[Comment\]\s*//g; $s =~ s/^Re:\s*//i; $s;}
RT-Attach-Message: yes

{RT->Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id}
This is a comment.  It is not sent to the Requestor(s):

Ticket History
=========
{
  my $transactions = $Ticket->Transactions;
  $transactions->OrderByCols({ FIELD => 'Created', ORDER => 'DESC' });
  my $content = "";
  while (my $trans = $transactions->Next) {
    next unless $trans->Type =~ /^(Create|Comment|Correspond)$/;
    $content .= "----------\n". $trans->Type. " by " . $trans->CreatorObj->Name . "\n";
    $content .= $trans->Content;
  }
  $content;
}
By Alister West