Is there a shortcut to get the ticket creation comments in a template?

I’m currently using this:

{
my $attachments = RT::Attachments->new(RT->SystemUser);
$attachments->LimitByTicket($ticket->id);
$attachments->Limit( ALIAS => $attachments->TransactionAlias,
FIELD => ‘Type’,
OPERATOR => ‘=’,
VALUE => ‘Create’,
ENTRYAGGREGATOR => ‘OR’,
CASESENSITIVE => 1
);

my $subject;
my $summary;
while (my $att = $attachments->Next) {
  $subject = $att->Subject;
  $summary = $att->Content;
}

   $summary;

}

This is for intermediate reminders, not for the creation, so I can’t
use $Transaction->Content()

http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin

I’m currently using this:

{
my $attachments = RT::Attachments->new(RT->SystemUser);
$attachments->LimitByTicket($ticket->id);
$attachments->Limit( ALIAS => $attachments->TransactionAlias,
FIELD => ‘Type’,
OPERATOR => ‘=’,
VALUE => ‘Create’,
ENTRYAGGREGATOR => ‘OR’,
CASESENSITIVE => 1
);

   my $subject;
   my $summary;
   while (my $att = $attachments->Next) {
     $subject = $att->Subject;
     $summary = $att->Content;
   }

  $summary;

}

This is for intermediate reminders, not for the creation, so I can’t
use $Transaction->Content()

It looks like
{
$Ticket->Transactions->First->Content;
}

Does the same thing. Cool.

http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin