Sending e-mail by Scrips: Unrecognisezed Error

Hello All,

I’m using the scrip’s that there’s in standard installation, but the most doesn’t work… It means, doesn’t send e-mails. I already changed $NotifyActor in RT_Config.pm but nothing happens. Although, there’s 2 scrip’s that works… “On Create Autoreply To Requestors with template Autoreply” and “On Correspond Notify AdminCcs with template Admin Correspondence”. I looked to rt.log, http.log but there is no error!! I don’t know what I have to do… Someone could help me, please?!

More Informations: RT 3.4.0RC6 + Apache 2.0.50 + Perl 5.8.5 + modperl2 + mysql 14.7 + DBI::SearchBuilder 1.22

Thanks in advance!!

Rodolfo de Moraes Reis
CPqD Telecom & IT Solutions
Tel.: +55 19 3705-5986
Fax: +55 19 3705-6786
rmreis@cpqd.com.br
www.cpqd.com.br

I want to add someone as an AdminCc when a ticket is moved from a
specific queue to another specific queue.

I don’t want to make that person a watcher for the whole queue (I only
want them to be an AdminCc for tickets that get moved in from one queue
to another).
For example if a ticket moves from our “web” queue (#5) to our
“systems” queue (#10) I want “myuser@myuniversity.edu” to become an
AdminCc for that ticket.

I looked at the wiki, in particular:
http://wiki.bestpractical.com/index.cgi?AddAdminCc

What I have mostly works, I just need to somehow change my if condition
from $queue == 10 to $previousqueue == 5.
I’m not sure how to I would go about getting the “$previousqueue” variable.

This is how I’m doing my scrip for our “Systems”.
Description: AddAdminCCIfFromWeb
Condition: On Queue Change
Action: User defined
Template: Global template: blank
Stage: TransactionCreate
Custom Condition:
Custom action preparation code: return 1;
Custom action cleanup code:
my $admincclist = $self->TicketObj->AdminCc;
my $queue = $self->TicketObj->Queue;

my $user = RT::User->new($RT::SystemUser);
if ($queue == 10) {
$user->LoadByEmail(‘myuser@myuniversity.edu’);
$admincclist->AddMember($user->Id);
}

Thanks,
Mike

At Monday 1/31/2005 05:20 PM, Mike Patterson wrote:

I want to add someone as an AdminCc when a ticket is moved from a specific
queue to another specific queue.
I don’t want to make that person a watcher for the whole queue (I only
want them to be an AdminCc for tickets that get moved in from one queue to
another).
For example if a ticket moves from our “web” queue (#5) to our “systems”
queue (#10) I want “myuser@myuniversity.edu” to become an AdminCc for that
ticket.

I looked at the wiki, in particular:
Request Tracker Wiki

What I have mostly works, I just need to somehow change my if condition
from $queue == 10 to $previousqueue == 5.
I’m not sure how to I would go about getting the “$previousqueue” variable.

Mike,

I just happen to have done something similar this week - here’s what I have
in a user-defined condition for the scrip. The scrip is attached to the
queue you are transferring TO.

On queue change from :

NOTE - queue id 5 is hard coded. This is the queue we are transferring FROM.

if ($self->TransactionObj->Type eq “Set”
&& $self->TransactionObj->Field eq “Queue”
&& $self->TransactionObj->OldValue eq “5”
) {
return 1;
} else {
return 0;
}

Steve

Stephen,

That did it. Thanks :slight_smile:
I updated the wiki with this additional option:
http://wiki.bestpractical.com/index.cgi?AddAdminCc

If a ticket moves from our “web” queue (#5) to our “systems” queue
(#10) I want “myuser@myuniversity.edu” to become an AdminCc for that
ticket.
I create this scrip on the queue I’m moving the ticket into.
Description: AddAdminCCIfFromWeb
Condition: On Queue Change
Action: User defined
Template: Global template: blank
Stage: TransactionCreate
Custom Condition:
Custom action preparation code: return 1;
Custom action cleanup code:
my $admincclist = $self->TicketObj->AdminCc;
my $user = RT::User->new($RT::SystemUser);

if ($self->TransactionObj->Type eq “Set”
&& $self->TransactionObj->Field eq “Queue”
&& $self->TransactionObj->OldValue eq “5”
) {
$user->LoadByEmail(‘myuser@myuniversity.edu’);
$admincclist->AddMember($user->Id);
} else {
return 0;
}