Custom Autoreply Failure

Hi All,

I developed the SelectedAutoreply feature below:

Condition: User Defined
Custom condition: use RT::CurrentUser;
my $User = new RT::CurrentUser();
$User->Load($self->TicketObj->Creator);
if (($self->TransactionObj->Type eq “Create”) and
(($self->TicketObj->Subject =~ /application for/i) or ($User->Name =~
/sales@host4africa.com/i))) {
return(0);
} else {
return(1);
}

Action: Autoreply To Requestors

Custom action preparation code:

Custom action cleanup code:

Stage: TransactionCreate

Template: Sales - AutoReply

When I send an email to this queue, it responds as one would expect.

Expected behavior:
- Do not send a reply if the Ticket->Type is Create and Ticket->Subject:
contains ‘application for’
- Do not send a reply if the Ticket->Type is Create and Ticket the
ticket originates from the ticket address (sales@host4africa.com).

Unexpected behavior:
- When I reply to a ticket and mark it to be a comment, it sends 3
AutoReplies to the requestor.

Could someone possibly explain to me why, this happens, so that I may
rectify the problem.

Thank you all kindly.

Regards,
-Carl

There are other transactions going on?

Try changing your code as below and looking at the RT log.

                 } else {
		$RT::Logger->info("Tansaction: " . $self->TransactionObj->Type);
                     return(1);
                 }

-ToddOn Fri, Feb 06, 2004 at 03:27:56PM +0200, Carl Swart wrote:

Hi All,

I developed the SelectedAutoreply feature below:

Condition: User Defined
Custom condition: use RT::CurrentUser;
my $User = new RT::CurrentUser();
$User->Load($self->TicketObj->Creator);
if (($self->TransactionObj->Type eq “Create”) and
(($self->TicketObj->Subject =~ /application for/i) or ($User->Name =~
/sales@host4africa.com/i))) {
return(0);
} else {
return(1);
}

Action: Autoreply To Requestors

Custom action preparation code:

Custom action cleanup code:

Stage: TransactionCreate

Template: Sales - AutoReply

When I send an email to this queue, it responds as one would expect.

Expected behavior:

- Do not send a reply if the Ticket->Type is Create and Ticket->Subject:

contains ‘application for’
- Do not send a reply if the Ticket->Type is Create and Ticket the
ticket originates from the ticket address (sales@host4africa.com).

Unexpected behavior:

- When I reply to a ticket and mark it to be a comment, it sends 3

AutoReplies to the requestor.

Could someone possibly explain to me why, this happens, so that I may
rectify the problem.

Thank you all kindly.

Regards,
-Carl


rt-users mailing list
rt-users@lists.bestpractical.com
The rt-users Archives

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm