[rt-users] round-robin auto assignment?

Thomas Sibley trs at bestpractical.com
Fri Apr 12 13:18:44 EDT 2013


On 04/12/2013 08:20 AM, Doug Eubanks wrote:
> foreach $i ( @owners) { 
>   if ($owners[$i] == $last_owner) { 
>     $new_owner = $owners[$i+1]; 

The above makes no sense, likely written by someone who doesn't know
Perl.  For loops don't loop over array indexes when just given an array,
they loop over the array items.  Try:

foreach $id (@owner) {
  if ($id == $last_owner) {
    $new_owner = $id;

>     $self->TicketObj->SetOwner($new_owner); 
>     $isSet = 1; 
>   } 
> } 




More information about the rt-users mailing list