[rt-users] Email Queue Routing
Raed El-Hames
Raed.El-Hames at daisygroupplc.com
Thu Jan 20 06:10:18 EST 2011
Pierre:
my $queues = new RT::Queues(RT::SystemUser);
is fine but you need to limit
Just add
$queues->UnLimit;
my $queues = new RT::Queues(RT::SystemUser);
$queues->UnLimit;
foreach my $queue ($queues->Next) {
}
By the way , a comment on your next bit, I am just curious why you build a hash , then you go through it looking for a match??
Why don't you do
foreach my $queue ($queues->Next) {
my $blah = $queue->FirstCustomFieldValue('MailDomain') ;
If ($self->TicketObj->RequestorAddresses =~ /^.*?${$blah}/) {
$self->TicketObj->SetQueue($queue->id);
return;
}
}
Roy
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Pierre Buhas
Sent: 20 January 2011 09:14
To: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Email Queue Routing
This is my loop on the queues which is not working..
my $queues = new RT::Queues(RT::SystemUser);
foreach my $queue ($queues->Next) {
there must be some mistake above. Is the creation of my variable $queues correct ?
I also tried the following:
my $queues = new RT::Queues(RT::SystemUser);
while ( my $queue = $queues->Next ) {
but it did not work better. So that's why I suspect this is the way I get the list of queues which is not the way it should be..
Any idea ?
Thanks
Pierre BUHAS
+353 1 217 8422
Duolog Technologies
On 19 January 2011 21:43, Kevin Falcone <falcone at bestpractical.com<mailto:falcone at bestpractical.com>> wrote:
On Wed, Jan 19, 2011 at 02:09:38PM +0000, Pierre Buhas wrote:
> my %domain_map = ();
> my $queues = new RT::Queues(RT::SystemUser);
> foreach my $queue ($queues->Next) {
> $domain_map { $queue->FirstCustomFieldValue('MailDomain') } = $queue->Name;
> }
That really wants to be a while ( my $queue = $queues->Next ) {
The new is really old-style but should be fine
-kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110120/e2449234/attachment.htm>
More information about the rt-users
mailing list