Re: [rt-users] how to move tickets to different queue?

2010-04-06 Thread H Manohar Rayker
Thank You very much Roy, this thing worked.

-Original Message-
From: Raed El-Hames [mailto:r...@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 =~  /myna...@somedomain\.com 
<mailto:myn...@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:
>
>  
>
> myn...@somedomain.com <mailto:myn...@somedomain.com>   tickets should 
> be moved to new_queue
>
>  
>
>  
>
> Thanks
>
> Manohar
>


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] how to move tickets to different queue?

2010-04-06 Thread H Manohar Rayker
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]'=> "",

   '[EMAIL PROTECTED]'=> ""

);

 

#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

Manohar

  _  

From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@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: 

 

myn...@somedomain.com   tickets should be moved to new_queue

 

 

Thanks

Manohar


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Re: [rt-users] how to move tickets to different queue?

2010-04-06 Thread Raed El-Hames

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 =~  /myna...@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:

 

myn...@somedomain.com    tickets should 
be moved to new_queue


 

 


Thanks

Manohar



Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


[rt-users] how to move tickets to different queue?

2010-04-06 Thread H Manohar Rayker
Hi,

 

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

 

For eg: 

 

myn...@somedomain.com   tickets should be moved to new_queue

 

 

Thanks

Manohar


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com