X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FRule.pm;h=675191535c094c411e60397aa1153275d8ffa9a3;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hp=86ff63d9062fa4a96651550825ca804db9519a87;hpb=75162bb14b3e38d66617077843f4dfdcaf09d5c4;p=freeside.git diff --git a/rt/lib/RT/Rule.pm b/rt/lib/RT/Rule.pm index 86ff63d90..675191535 100644 --- a/rt/lib/RT/Rule.pm +++ b/rt/lib/RT/Rule.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -49,15 +49,24 @@ package RT::Rule; use strict; use warnings; + use base 'RT::Action'; use constant _Stage => 'TransactionCreate'; use constant _Queue => undef; + + sub Prepare { my $self = shift; - return (0) if $self->_Queue && $self->TicketObj->QueueObj->Name ne $self->_Queue; - return 1; + if ( $self->_Queue ) { + my $queue = RT::Queue->new( RT->SystemUser ); + $queue->Load( $self->TicketObj->__Value('Queue') ); + if ( $queue->Name ne $self->_Queue ) { + return (0); + } + return 1; + } } sub Commit {