[rt-users] round-robin auto assignment?

matthew zeier mrz at intelenet.net
Wed Dec 15 23:44:54 EST 2004


I forgot to change 'my queue' to something more meaningful.  However, I 
don't think this scrip is even being called.  Here's my log output:

[Thu Dec 16 04:37:35 2004] [debug]: About to think about scrips for 
transaction147917 (/opt/rt3/lib/RT/Transaction_Overlay.pm:140)
[Thu Dec 16 04:37:35 2004] [debug]: About to prepare scrips for 
transaction147917 (/opt/rt3/lib/RT/Transaction_Overlay.pm:144)
[Thu Dec 16 04:37:35 2004] [debug]: Found 4 scrips 
(/opt/rt3/lib/RT/Scrips_Overlay.pm:349)
[Thu Dec 16 04:37:35 2004] [debug]: Converting 'utf-8' to 'us-ascii' 
for text/plain - [intelenet.net #26582] t2
  (/opt/rt3/lib/RT/I18N.pm:222)
[Thu Dec 16 04:37:35 2004] [debug]: Converting 'utf-8' to 'us-ascii' 
for text/plain - [intelenet.net #26582] t2
  (/opt/rt3/lib/RT/I18N.pm:222)
[Thu Dec 16 04:37:36 2004] [debug]: About to commit scrips for 
transaction147917 (/opt/rt3/lib/RT/Transaction_Overlay.pm:153)
[Thu Dec 16 04:37:36 2004] [info]: 
<rt-3.2.2-26582-147917-3.10.6204116387742 at intelenet.net> #26582/147917 
- Scrip 3 Create - Notify AdminCcs 
(/opt/rt3/lib/RT/Action/SendEmail.pm:231)
[Thu Dec 16 04:37:36 2004] [info]: 
<rt-3.2.2-26582-147917-3.10.6204116387742 at intelenet.net> sent To: 
"AdminCc of InteleNet Ticket #26582":; Cc:  Bcc: van at t 
(/opt/rt3/lib/RT/Action/SendEmail.pm:291)
[Thu Dec 16 04:37:36 2004] [info]: 
<rt-3.2.2-26582-147917-14.10.6792598340465 at intelenet.net> #26582/147917 
- Scrip 14 On Transaction, Nofity Owner 
(/opt/rt3/lib/RT/Action/SendEmail.pm:231)
[Thu Dec 16 04:37:36 2004] [info]: 
<rt-3.2.2-26582-147917-14.10.6792598340465 at intelenet.net> No recipients 
found. Not sending.
  (/opt/rt3/lib/RT/Action/SendEmail.pm:243)
[Thu Dec 16 04:37:36 2004] [info]: Ticket 26582 created in queue 'ICI 
Internal' by mrz (/opt/rt3/lib/RT/Ticket_Overlay.pm:718)


On Dec 15, 2004, at 3:44 PM, matthew zeier wrote:

>
> Condition: On Create
> Action: User Defined
> Template: blank
> Stage: TransactionCreate
>
> I pasted what you had  into "Custom action prep code" .  Its a scrip 
> just for a particular queue.  I'm seeing the following error:
>
>
> [Wed Dec 15 23:35:51 2004] [error]: Scrip 57 Prepare failed: Global 
> symbol "$Ticket" requires explicit package name at (eval 2222) line 6.
> Global symbol "$Ticket" requires explicit package name at (eval 2222) 
> line 17.
> (/opt/rt3/lib/RT/Action/UserDefined.pm:65)
>
> What's the right way to reference $Ticket?
>
> my @owners = qw( mrz jstein vzwick ); #could create a group for this
> push(@owners, @owners);
>
> my $tickets = RT::Tickets->new($RT::System);
> $tickets->LimitQueue(VALUE => 'my queue');
> $tickets->LimitId(VALUE => $Ticket->Id, OPERATOR => '!=');
> $tickets->OrderBy( FIELD => 'id', ORDER => 'DESC' );
> my $last_ticket = $tickets->First;
> my $last_owner = $last_ticket->Owner->Name;
>
> my $i = 0;
> my $new_owner;
>
> while (1) {
>    if ($owners[$i] eq $last_owner) {
>        $new_owner = $owners[$i+1];
>        $Ticket->SetOwner($new_owner);
>        last;
>    }
> }
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
>
--
matthew zeier - "Nothing in life is to be feared.  It is only to be
understood." - Marie Curie




More information about the rt-users mailing list