[Rt-commit] rt branch, 3.8-infinite-loop-global-cfs, created. rt-3.8.7-55-g78bb80f
Kevin Falcone
falcone at bestpractical.com
Tue Dec 22 14:46:41 EST 2009
The branch, 3.8-infinite-loop-global-cfs has been created
at 78bb80f101ece347f821e8f7e087b08548dfc6c5 (commit)
- Log -----------------------------------------------------------------
commit 78bb80f101ece347f821e8f7e087b08548dfc6c5
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue Dec 22 14:06:40 2009 -0500
Stop infinte looping when you have global custom fields and no Queue restriction
Set up a global custom field on tickets and then search for tickets with
id < 100 and click on the Spreadsheet link.
If you don't have Queue in your search query, Parse::BooleanLogic is
going to return [] and we'll _OpenParen and then _CloseParen without
inserting clauses between them. DBIx::SearchBuilder::MayBeNull then
goes into an infinite loop and you never get your tsv.
diff --git a/lib/RT/SQL.pm b/lib/RT/SQL.pm
index 3074328..bf48bda 100644
--- a/lib/RT/SQL.pm
+++ b/lib/RT/SQL.pm
@@ -229,7 +229,7 @@ sub PossibleCustomFields {
sub { $_[0]->{'key'} =~ /^Queue(?:\z|\.)/ },
);
}
- if ( $tree ) {
+ if ( $tree && @$tree ) {
my $clause = 'QUEUES';
my $queue_alias = $cfs->Join(
TYPE => 'LEFT',
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list