Moving a ticket based on the subject line

Hi,

I am using RT 3.2.3, I have set one email-id for the helpdesk. Now based
on the subject I want to transfer the tickets to different queues.

For example, I have assigned helpdesk@xyz.com email-id to queue called
general. Now based on the subject like ‘PC’, ‘Software’, ‘Email’ I want
to move the tickets to PCQueue, SoftwareQueue, EmailQueue respectively.

Is anybody had implement this? Any help will be greatly appreciated.

Thanks.

Prasad Deshpande

DISCLAIMER:
This message,including any attachments contains confidential and privileged information for the sole use of the intended recipient(s), and is protected by law. If you are not the intended recipient, please destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
Bajaj Auto reserves the right to record, monitor, and inspect all email communications through its internal and external networks. Your messages shall be subject to such lawful supervision as Bajaj Auto deems necessary in order to protect its information, interests and reputation. Bajaj Auto prohibits and takes steps to prevent its information systems from being used to view, store or forward offensive or discriminatory material. If this message contains such material, please report it to abuse@bajajauto.co.in.

Two ways I know of to accomplish this, most easy would be to create seperate
emails for each one, and have your email handler do it for you, but if you
must do it after the fact an on transaction scrip could pull this off for
you.

something like this perhaps in your on “action cleanup”

my $ticketObj  = $self->TicketObj;

#Map where item to find in subject,Queue to assign to.
my %queuemap = ('PC','PCQueue',
                'SOFTWARE','SoftwareQueue',
                'EMAIL','EmailQueue');


foreach my $search(sort keys %queuemap)
{
     if ($ticketObj->subject =~/\Q$search\E/)
     {
        my ($status, $msg) = $ticketObj->SetQueue($queuemap{$search});
        unless ($status) {
            $RT::Logger->warning("unable to set new queue: $msg");
            return undef;
        }
        last;
     };
};

return 1;

of course this will map the first occurrance , so a subject saying “PC
SOFTWARE” would get placed in the PC queue.

Hope this helps (I’m sure somebody will have a more elegant solution)…

RodneyOn 4/26/06, Prasad Deshpande prasaddeshpande@bajajfinance.in wrote:

Hi,

I am using RT 3.2.3, I have set one email-id for the helpdesk. Now based
on the subject I want to transfer the tickets to different queues.

For example, I have assigned helpdesk@xyz.com email-id to queue called
general. Now based on the subject like ‘PC’, ‘Software’, ‘Email’ I want to
move the tickets to PCQueue, SoftwareQueue, EmailQueue respectively.

Is anybody had implement this? Any help will be greatly appreciated.

Thanks.

Prasad Deshpande

DISCLAIMER:
This message,including any attachments contains confidential and
privileged information for the sole use of the intended recipient(s), and is
protected by law. If you are not the intended recipient, please destroy all
copies of the original message. Any unauthorized review, use, disclosure,
dissemination, forwarding, printing or copying of this email or any action
taken in reliance on this e-mail is strictly prohibited and may be unlawful.
Bajaj Auto reserves the right to record, monitor, and inspect all email
communications through its internal and external networks. Your messages
shall be subject to such lawful supervision as Bajaj Auto deems necessary in
order to protect its information, interests and reputation. Bajaj Auto
prohibits and takes steps to prevent its information systems from being used
to view, store or forward offensive or discriminatory material. If this
message contains such material, please report it to abuse@bajajauto.co.in.


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

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

We’re hiring! Come hack Perl for Best Practical: http://bestpractical.com/about/jobs.html

Hi,On Thursday 27 April 2006 06:13, Prasad Deshpande wrote:

I am using RT 3.2.3, I have set one email-id for the helpdesk. Now
based on the subject I want to transfer the tickets to different
queues.

For example, I have assigned helpdesk@xyz.com email-id to queue called
general. Now based on the subject like ‘PC’, ‘Software’, ‘Email’ I
want to move the tickets to PCQueue, SoftwareQueue, EmailQueue
respectively.

Is anybody had implement this? Any help will be greatly appreciated.

I had used procmail or maildrop for this.
You have to configure your MTA to forward all mails to procmail or
maildrop, which then calls rt-mailgate with a different queue based on
the subject line.

Another way would be a scrip in queue general, which changes the queue
accordingly.
if ($self->TicketObj->Subject =~ /Software/) {
my ($status, $msg) = $self->TicketObj->SetQeue(“SoftwareQueue”);

}

regards,
andreas