[Rt-commit] r8260 -
rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/SelectOwner
ruz at bestpractical.com
ruz at bestpractical.com
Mon Jul 23 11:45:49 EDT 2007
Author: ruz
Date: Mon Jul 23 11:45:47 2007
New Revision: 8260
Modified:
rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/SelectOwner/UpdateObjectList
Log:
* use __Value instead of getter on queue as we really need the value regardless ACL
* get rid of unint warning
Modified: rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/SelectOwner/UpdateObjectList
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/SelectOwner/UpdateObjectList (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Elements/SelectOwner/UpdateObjectList Mon Jul 23 11:45:47 2007
@@ -10,12 +10,19 @@
}
my @new_objects;
foreach my $object (@$objects) {
- if ($object->isa('RT::Queue') && $object->Name =~ /^(?:Incidents|Investigations|Incident Reports|Blocks)$/) {
- my $queues = RT::Queues->new($RT::SystemUser);
- $queues->Limit(FIELD =>'Name', OPERATOR => 'STARTSWITH', VALUE => $object->Name);
- while (my $queue = $queues->Next) { warn "Adding ".$queue->Name; unshift @new_objects,$queue; }
+ next unless ($object->__Value('Name')||'') =~ /^(?:Incidents|Investigations|Incident Reports|Blocks)$/;
+ my $queues = RT::Queues->new( $RT::SystemUser );
+ $queues->Limit(
+ FIELD =>'Name',
+ OPERATOR => 'STARTSWITH',
+ VALUE => $object->__Value('Name'),
+ );
+ while ( my $queue = $queues->Next ) {
+ warn "Adding ".$queue->Name;
+ unshift @new_objects,$queue;
}
+
}
push @$objects, @new_objects;
</%init>
More information about the Rt-commit
mailing list