[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-users
Subject: Re: [rt-users] round-robin auto assignment?
From: "matthew zeier" <mrz () intelenet ! net>
Date: 2004-12-28 23:36:33
Message-ID: 02a101c4ed36$10e5d090$88180a0a () MRZTP
[Download RAW message or body]
>
> $self->TicketObj->SetOwner
Hey, that was it. But I guess now I'm missing one other piece of data -
currentuser?
I promise after I get this resolved, I'll sign up for the one day RT
developer training session!
[Tue Dec 28 23:30:34 2004] [error]: Scrip 57 Prepare failed: No currentuser
at /opt/rt3/lib/RT/Base.pm line 123
RT::Base::loc('RT::System=HASH(0x9d9940c)', 'Queue') called at
/opt/rt3/lib/RT/Base.pm line 118
RT::Base::loc('RT::Tickets=HASH(0x9d3cd78)', 'Queue') called at
/opt/rt3/lib/RT/Tickets_Overlay.pm line 1047
RT::Tickets::LimitQueue('RT::Tickets=HASH(0x9d3cd78)', 'VALUE', 'ICI
Internal') called at (eval 2529) line 5
eval 'my @owners = qw( 2306 904 1880 ); #could create a group for
this
push(@owners, @owners);
my $tickets = RT::Tickets->new($RT::System);
$tickets->LimitQueue(VALUE => \'ICI Internal\');
$tickets->LimitId(VALUE => $self->TicketObj->Id, OPERATOR => \'!=\');
$tickets->OrderBy( FIELD => \'id\', ORDER => \'DESC\' );
my $last_ticket = $tickets->First;
my $last_owner = $last_ticket->Owner->Id;
my $i = 0;
my $isSet = 0;
my $new_owner;
foreach $i ( @owners) {
if ($owners[$i] == $last_owner) {
$new_owner = $owners[$i+1];
$self->TicketObj->SetOwner($new_owner);
$isSet = 1;
}
}
if (!($isSet)) {
my $randOwner = int(rand($#owners));
$randOwner = $owners[$randOwner];
$self->TicketObj->SetOwner($randOwner);
}
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Be sure to check out the RT wiki at http://wiki.bestpractical.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic