[rt-users] Can a scrip do a search like RT::Client::REST does?

Landon landonstewart at gmail.com
Thu Jun 13 14:29:29 EDT 2013


.
.. and in case anyone was curious the equivelent and much better looking
code to the RT::Client::REST snippet I provided earlier is:

my $ips = $self->TicketObj->CustomFieldValues( 'IP' );
while ( my $ipobj = $ips->Next ) {
  my $ip = $ipobj->Content;
  my $tsql = qq/Queue = 'Incidents' AND Status = 'open' AND CF.{IP} =
'$ip'/;
  my $tickets = RT::Tickets->new(RT->SystemUser);
  $tickets->FromSQL($tsql);
  while (my $t = $tickets->Next) {
    $self->TicketObj->AddLink( Type=>'MemberOf', Target=> $t->id );
  }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130613/bde23c1a/attachment.htm>


More information about the rt-users mailing list