[rt-users] Where are comments and correspondence held?

Max McGrath mmcgrath at carthage.edu
Tue Nov 6 09:52:45 EST 2012


Thanks all!

Very helpful!
--
Max McGrath
Network Administrator
Carthage College
262-552-5512
mmcgrath at carthage.edu


On Tue, Nov 6, 2012 at 6:24 AM, Paul Tomblin <ptomblin at xcski.com> wrote:

>
>
> On Tue, Nov 6, 2012 at 4:58 AM, Tim Cutts <tjrc at sanger.ac.uk> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20121106/2674ead2/attachment.htm>


More information about the rt-users mailing list