On Tue, Nov 6, 2012 at 4:58 AM, Tim Cutts <[email protected]> wrote:
> But generally you don't want to do that, and instead you want to use the
> perl API to get at them:
>
> my $attachments = RT::Attachments->new(RT->SystemUser);
> $attachments->LimitByTicket(294774);
> $attachments->LimitNotEmpty;
>
And if you *just* want Comments, say, you can do
my $attachments = RT::Attachments->new(RT->SystemUser);
$attachments->LimitByTicket(294774);
$attachments->Limit(
ALIAS => $attachments->TransactionAlias,
FIELD => 'Type',
OPERATOR => '=',
VALUE => 'Comment',
ENTRYAGGREGATOR => 'OR',
CASESENSITIVE => 1
);
while (my $attachment = $attachments->Next)
{
(If there's an easier way to do that, please let me know)
--
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin
--------
We're hiring! http://bestpractical.com/jobs