[rt-users] On Queue Change

Rodney Rindels rrindels at gmail.com
Tue Apr 11 16:13:21 EDT 2006


I have a custom scrip that were trying to get to fire on a Queue Change to
Round Robin the owner assignment.

Description: QueueChangeHCAutoAssign
Condition: On Queue Change
Action: user Defined
Template: Global Template Transaction
Stage: Transaction Complete

Custom Condition: return 1;
Custom Action Preperation Code: return 1;
Custom Action Cleanup Code:
my $QueueName = "HealthCheck/Follow-up";
return 1 unless $self->TicketObj->QueueObj->Name eq $QueueName;
my %hash  = (
        '0' => 'user0',
        '1' => 'user1',
        '2' => 'user2',
        '3' => 'user3',
        '4' => 'user4',
        '5' => 'user5',
        '6' => 'user6',
        '7' => 'user7');

my $user = $hash{int(rand(8))};

$RT::Logger->info("Auto assigning ticket #". $self->TicketObj->id ." to user
$user" );

my ($status, $msg) = $self->TicketObj->SetOwner( $user );

unless( $status ) {
  $RT::Logger->warning( "Impossible to assign the ticket to $user: $msg" );
return undef;
}

1;

Looking at the log, it seems as if this Global Scrip is never firing? Is
there a problem with the On Queue Change, or Do I have something Borked up
here?

Thanks,

Rodney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060411/a28fd61a/attachment.htm>


More information about the rt-users mailing list