Re: [rt-users] Rt-crontool configure to set/move queue of ticket
Ok, so I've cobbled together a custom actions module like this: 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 ($status, $msg) = $self-TicketObj-SetQueue(Support2nd); if ( not $status ) { RT::Logger-error(Could not reassign queue: $msg); } return 1; } 1; To get to where I want it to be I now need to work out where the --action-arg is being passed or how to read that from within the module, is it the second arguement of $self? Also what is the easiest way to notify all AdminCCs from within the module? thanks! Andy.
Re: [rt-users] Rt-crontool configure to set/move queue of ticket
Ok, I've robbed the code: my $argument = $self-Argument; unless ( $argument ) { $RT::Logger-error(Argument is mandatory for Test action); return 0; } So now I can read in --action-arg. For the email on queue change I tried creating a Scrip to do this via the GUI, this works fine if I change the queue via the GUI but when rt-crontool does it I don't get the notification :(. TBH I'd rather do this directly in my custom perl module so any help would be gratefully recieved on an easy way to achieve this, I want to notify AdminCCs, thanks, Andy.