[rt-users] Multi Queue Management - Tickets copy to other queue

Stephane Masse stephane.masse at rmit.edu.vn
Mon Apr 2 21:38:29 EDT 2012


Hi, 

I did this script under one queue, on correspond, user defined, template
resolved (relevant ?) transaction create or batch (both not works)

Any advice if this is a good way to proceed to copy ticket to other
queue when cc particular emails ?

 

Custom Condition

 

my $ContentObj = $self->TransactionObj->Attachments->First();

my $Headers = $ContentObj->{values}{headers};

if ($Headers =~ /^To: .*OTHERQUEUEMAILBOX.*/im) {

    return 0;

}

if ($Headers =~ /^CC: .*OTHERQUEUEMAILBOX.*/im) {

    return 0;

}

 return 1;

 

Custom action preparation code:

 

local $Text::Wrap::columns = 64;

my %links = ('*' => 'DependedOnBy', '+' => 'Parents', '@' =>
'RefersTo');

  my $tkt = $self->TicketObj;

   my $cont = $self->TransactionObj->Content;

   my $requestors = [ $tkt->Requestors->MemberEmailAddresses ];

   my $sym = qr/[\Q@{[join '', keys %links]}\E]/;

   my $tsubject = $self->TicketObj->Subject;

   $cont =~ s/^\s*(#[^\n]+\n)+\n?//s;

   $cont =~ s/^-- \n.+$//m;

   1 while $cont =~ s/^(\s*$sym\s*[^\n]+)\n(?!^$sym)/$1 /m; 

       my $new_tkt = RT::Ticket->new($RT::Nobody);

       my ($id, $msg) = $new_tkt->Create(

                     Queue => "TODO",

                     Subject => $tsubject,

                     Status => 'new',

                     Owner => $tkt->Owner,

                     Requestor => $requestors,

                     $links{$link} => $tkt->Id,

                     MIMEObj => MIME::Entity->build(Data => $cont)

     );

 

From: Stephane Masse 
Sent: Friday, March 30, 2012 3:46 PM
To: 'rt-users at lists.bestpractical.com'
Subject: Multi Queue Management - Tickets copy to other queue

 

Hi, 

 

I have an instance of RT 4, with different queues in the system for
different emails (IT at ... HR at ...)

When I try to reply to a requestor, I can CC one more department, but RT
don't create the ticket, due to the loop prevention mechanism

I disable the loop prevention, then RT merge the ticket due the subject
Tag. So both are not what I expected

 

We also try 2 extensions but cannot achieve to transfer tickets between
queues by CCs.

Anyone have the same scenario, or RT is not capable to handle multi
queue ?

What is the best approach, scripting, extensions, modify the source of
email.pm, sendmail.pm or emailparser.pm ?

 

Regards

 

Stephane Masse

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120403/40a069eb/attachment.htm>


More information about the rt-users mailing list