[rt-users] Selecting Queues Dynamically with Perl API in 4.0.2

Srikumar Nair srikumarp at fb.com
Thu Oct 27 13:05:43 EDT 2011


I have setup the Queue with a custom field called 'Country' and created a queue with country populated with 'United States'.

Then, I am using the following code snippet to select this Queue based on the custom Country field value in Queue.

$cfCountryQ = RT::CustomField->new(RT->SystemUser);
$cfCountryQ->LoadByName(Name => 'Country');

$splQueues = RT::Queues->new(RT->SystemUser);
$splQueues->LimitCustomField (CustomField => $cfCountryQ->id, Value => 'United States');

while (my $splQueue = $splQueues->Next) {
  print ("inside the loop\n");
  print ($splQueue->Name);
}

The control does not go inside the loop. I am wondering what is that I am doing wrong here..

~
~
~
~
~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111027/79d052e7/attachment.htm>


More information about the rt-users mailing list