Re: simple custom Action gives Mason compiler error
[email protected] Fri, 27 Mar 2015 17:50:49 +0000
| Newsgroups | gmane.comp.bug-tracking.request-tracker.devel |
|---|---|
| Message-ID | <[email protected]> |
its a bit dead on here!
In case this helps anyone I eventually got
this working after lots of trial and error:
package
RT::Action::QChange;
use strict;
use warnings;
use base
qw(RT::Action::Notify);
use Email::Address;
sub Prepare {
my $self =
shift;
return 1;
}
my $self;
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 0;
}
RT::Base->_ImportOverlays();
return 1;
}
1;