How to move tickets to different queue?

Hi,

How can I move a ticket to a different queue on the time of creation based
on the senders email domain?

For eg:

myname@somedomain.com tickets should be moved to new_queue

Thanks

Manohar

Manohar;

Global or queue scrip ;
condition : On Create
action: User defined
Custom action preparation code:
return 1;
Custom action cleanup code:
if ($self->TicketObj->RequestorAddresses =~ /myname@somedomain.com
mailto:myname@somedomain.com/ ) {
$self->TicketObj->SetQueue(‘new_queue’);
return 1;
}
return undef;

Regards;
Roy

H Manohar Rayker wrote:

In continuation for the previous mail - for this purpose I got a small scrip

Domains we want to move

my $domains = {};

my %domain_map = (

               '[EMAIL PROTECTED]'        => "xxxx",

               '[EMAIL PROTECTED]'        => "yyyy"

            );

#Check each of our defined domains for a match

foreach my $domainKey (keys %domain_map ){

if($self->TicketObj->RequestorAddresses =~ /^.*?${domainKey}/) {

# Domain matches - move to the right queue

#$self->TicketObj->SetQueue($domain_map{$domainKey});

$self->TicketObj->SetQueue(new_queue);

}

}

I created a new global scrip for the new queue and put this under the custom
action field of the scrip. Can anyone put some light on this?

Thanks

ManoharFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of H Manohar
Rayker
Sent: Tuesday, April 06, 2010 6:41 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] how to move tickets to different queue?

Hi,

How can I move a ticket to a different queue on the time of creation based
on the senders email domain?

For eg:

myname@somedomain.com tickets should be moved to new_queue

Thanks

Manohar

Thank You very much Roy, this thing worked.From: Raed El-Hames [mailto:rfh@vialtus.com]
Sent: Tuesday, April 06, 2010 7:05 PM
To: H Manohar Rayker
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] how to move tickets to different queue?

Manohar;

Global or queue scrip ;
condition : On Create
action: User defined
Custom action preparation code:
return 1;
Custom action cleanup code:
if ($self->TicketObj->RequestorAddresses =~ /myname@somedomain.com
mailto:myname@somedomain.com/ ) {
$self->TicketObj->SetQueue(‘new_queue’);
return 1;
}
return undef;

Regards;
Roy

H Manohar Rayker wrote:

Hi,

How can I move a ticket to a different queue on the time of creation
based on the senders email domain?

For eg:

myname@somedomain.com mailto:myname@somedomain.com tickets should
be moved to new_queue

Thanks

Manohar