[rt-users] Can a scrip do a search like RT::Client::REST does?
Landon
landonstewart at gmail.com
Thu Jun 13 14:15:56 EDT 2013
On 13 June 2013 11:05, Thomas Sibley <trs at bestpractical.com> wrote:
> On 06/13/2013 10:52 AM, Landon wrote:
> > Thanks Ken. The document I found was
> > at http://bestpractical.com/rt/docs/4.0/RT/Search.html
>
> You don't want RT::Search for this.
>
> You want to use the RT::Tickets class using the ->FromSQL method, which
> accepts TicketSQL. There are docs and plenty of examples in the RT source.
>
>
Aah thank you! Quick example I found which helps a lot is as follows:
my $tickets = RT::Tickets->new(RT->SystemUser);
$tickets->FromSQL($tsql);
while (my $t = $tickets->Next) {
# do stuff with each ticket $t here
print $t->Subject, "\n";
}
--
Landon Stewart <LandonStewart at Gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130613/b057a63f/attachment.htm>
More information about the rt-users
mailing list