<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">On 13 June 2013 11:05, Thomas Sibley <span dir="ltr"><<a href="mailto:trs@bestpractical.com" target="_blank">trs@bestpractical.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
On 06/13/2013 10:52 AM, Landon wrote:<br>
> Thanks Ken. The document I found was<br>
> at <a href="http://bestpractical.com/rt/docs/4.0/RT/Search.html" target="_blank">http://bestpractical.com/rt/docs/4.0/RT/Search.html</a><br>
<br>
</div>You don't want RT::Search for this.<br>
<br>
You want to use the RT::Tickets class using the ->FromSQL method, which<br>
accepts TicketSQL. There are docs and plenty of examples in the RT source.<br><br></blockquote><div><br></div><div><div style="font-family:verdana,sans-serif" class="gmail_default">Aah thank you! Quick example I found which helps a lot is as follows:</div>
<div class="gmail_default"><font face="courier new, monospace"><br></font></div><div class="gmail_default"><font face="courier new, monospace">my $tickets = RT::Tickets->new(RT->SystemUser);<br>$tickets->FromSQL($tsql);<br>
while (my $t = $tickets->Next) {<br> # do stuff with each ticket $t here<br> print $t->Subject, "\n"; <br><br>}</font><font face="verdana, sans-serif"><br clear="all"><div><br></div>-- <br><div>Landon Stewart <LandonStewart@Gmail.com><br>
</div>
<br><div><span style="font-family:arial;font-size:small"><br></span></div><div><span style="font-family:arial;font-size:small"><br></span></div></font></div><font face="verdana, sans-serif">
</font></div></div></div></div>