[rt-users] Is there a shortcut to get the ticket creation comments in a template?
Paul Tomblin
ptomblin at xcski.com
Thu May 17 17:07:34 EDT 2012
On Thu, May 17, 2012 at 4:15 PM, Paul Tomblin <ptomblin at xcski.com> wrote:
> 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
More information about the rt-users
mailing list