<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<pre>Hi,
I've created a Scrip with condition "On Queue Change" but it only works when I change the queue via the GUI. I've created a little custom perl module in Actions to change the queue which works great (I'm calling it from rt-crontool), but it doesn't trigger the Scrip. Anyone any ideas what's going on?
thanks, Andy.
PS the code for my PM is below:
<span style="font-family: 'courier new', courier;">use strict;
use warnings;
use RT::Queue;
use base qw(RT::Action);
package RT::Action::Test;
my $self;
sub Prepare {
my $self = shift;
return 1;
}
sub Commit {
my $self = shift;
my $argument = $self->Argument;
unless ( $argument ) {
$RT::Logger->error("Argument is mandatory for Test action");
return 0;
}
my ($status, $msg) = $self->TicketObj->SetQueue("$argument");
if ( not $status ) {
RT::Logger->error("Could not reassign queue: $msg");
}
return 1;
}
1;</span></pre>
</body></html>