[Rt-commit] [rtir] 10/12: Docs for GetQueueAttribute
Kevin Falcone
falcone at bestpractical.com
Mon Apr 14 13:16:45 EDT 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.2/unwrap-hook-lexwrap
in repository rtir.
commit 7a0876ba75642ffac4f1a344f02a888e6f4f4849
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Mar 26 18:44:51 2014 -0400
Docs for GetQueueAttribute
Also fix some horrible wrapping and note some other Attributes we should
be fixing.
---
lib/RT/IR.pm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 34d8e95..7407aba 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -801,9 +801,14 @@ if ( RT::IR->HasConstituency ) {
}
+ # TODO SubjectTag and Encryption Keys need overriding also
sub CorrespondAddress { GetQueueAttribute(shift, 'CorrespondAddress') }
sub CommentAddress { GetQueueAttribute(shift, 'CommentAddress') }
+ # dive down to get Queue Attributes from Incidents - EDUNET rather than Incidents
+ # Populates ConstituencyCache and HasNoQueueCache, but has the same
+ # bug around always over-checking the Constituency CF if we've
+ # cached that a ticket has no Constituency.
sub GetQueueAttribute {
my $queue = shift;
my $attr = shift;
@@ -817,8 +822,7 @@ if ( RT::IR->HasConstituency ) {
}
if ($const ne '_none' && !$RT::IR::HasNoQueueCache{$const} ) {
my $new_queue = RT::Queue->new(RT->SystemUser);
- $new_queue->LoadByCols(
- Name => $queue->Name . " - " . $const );
+ $new_queue->LoadByCols( Name => $queue->Name . " - " . $const );
if ( $new_queue->id ) {
my $val = $new_queue->_Value($attr) || $queue->_Value($attr);
RT->Logger->debug("Overriden $attr is $val for ticket #$id according to constituency $const");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list