[rt-users] round-robin auto assignment?

Doug Eubanks admin at dougware.net
Fri Apr 12 14:06:49 EDT 2013


I apologize, but Perl isn't my strong suit.  :D

Changing those three lines still compiles and updates the scrip, but it
doesn't do anything and never assigns the ticket to anyone now.

Doug

Sincerely,
Doug Eubanks
admin at dougware.net
K1DUG
(919) 201-8750


On Fri, Apr 12, 2013 at 1:18 PM, Thomas Sibley <trs at bestpractical.com>wrote:

> 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;
> >   }
> > }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130412/d10851cd/attachment.htm>


More information about the rt-users mailing list