I have an email address all my customers use to contact us
(support@). Whenever they send an email to this address, it creates a
ticket. That’s great.
Now I have noc people replying to these emails, which goes through RT
and changes the status of a ticket from new to open when there is a
reply. That’s great.
I want RT to automatically assign the ticket to the person who first
replied to the ticket email. RT needs to be sure that this person is
an RT user. I think that’s what the scrips are for, I’m just not sure
as to how to do it.
Haim Dimer
Systems Administrator
Prolexic Technologies
Office: 866-800-0366 x 1023
Fax: 954-925-6642
I have an email address all my customers use to contact us
(support@). Whenever they send an email to this address, it creates a
ticket. That’s great.
Now I have noc people replying to these emails, which goes through RT
and changes the status of a ticket from new to open when there is a
reply. That’s great.
I want RT to automatically assign the ticket to the person who first
replied to the ticket email. RT needs to be sure that this person is
an RT user. I think that’s what the scrips are for, I’m just not sure
as to how to do it.
You can do this by creating a custom scrip:
Description: Auto take on correspond
Condition: User defined
Action: User defined
Template: Blank
Stage: Transaction Create
Custom Condition:
if ($self->TransactionObj->Type eq “Correspond” or
$self->TransactionObj->Type eq “Comment”) {
return 1;
} else {
return undef;
}
Custom Action Preparation:
return 1;
Custom Action Code:
# get actor ID
my $Actor = $self->TransactionObj->Creator;
# if actor is RT_SystemUser then get out of here
return 1 if $Actor == $RT::SystemUser->id;
# get out unless ticket owner is nobody
return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
# bail if no right to own ticket
return 1 unless $self->TransactionObj->CreatorObj->HasRight(
Object => $self->TicketObj->QueueObj,
Right=> 'OwnTicket'
);
# ok, try to change owner
$RT::Logger->info("Auto assign ticket #" .
$self->TicketObj->id ." to user #". $Actor );
my ($status, $msg) = $self->TicketObj->SetOwner( $Actor );
unless( $status ) {
$RT::Logger->warning( "Failed to assign to $Actor: $msg" );
return undef;
}
return 1;
I have an email address all my customers use to contact us
(support@). Whenever they send an email to this address, it creates a
ticket. That’s great.
Now I have noc people replying to these emails, which goes through RT
and changes the status of a ticket from new to open when there is a
reply. That’s great.
I want RT to automatically assign the ticket to the person who first
replied to the ticket email. RT needs to be sure that this person is
an RT user. I think that’s what the scrips are for, I’m just not sure
as to how to do it.