[Rt-commit] r10839 - rt/branches/3.7-RTIR-RELENG/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Thu Feb 14 09:06:22 EST 2008
Author: ruz
Date: Thu Feb 14 09:06:21 2008
New Revision: 10839
Modified:
rt/branches/3.7-RTIR-RELENG/lib/RT/Tickets_Overlay.pm
Log:
* fix a regression in t/ticket/link_search.t
Modified: rt/branches/3.7-RTIR-RELENG/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/lib/RT/Tickets_Overlay.pm (original)
+++ rt/branches/3.7-RTIR-RELENG/lib/RT/Tickets_Overlay.pm Thu Feb 14 09:06:21 2008
@@ -342,6 +342,8 @@
if ( $op eq '!=' || $op =~ /\bNOT\b/i ) {
$is_negative = 1;
}
+ my $is_null = 0;
+ $is_null = 1 if !$value || $value =~ /^null$/io;
my $direction = $meta->[1] || '';
my ($matchfield, $linkfield) = ('', '');
@@ -358,15 +360,14 @@
$sb->_LinkLimit( 'LinkedTo', $op, $value, @rest );
$sb->_LinkLimit(
'LinkedFrom', $op, $value, @rest,
- ENTRYAGGREGATOR => $is_negative? 'OR': 'AND'
+ ENTRYAGGREGATOR => (($is_negative && $is_null) || (!$is_null && !$is_negative))? 'OR': 'AND',
);
$sb->_CloseParen;
return;
}
- my ($is_local, $is_null) = (1, 0);
- if ( !$value || $value =~ /^null$/io ) {
- $is_null = 1;
+ my $is_local = 1;
+ if ( $is_null ) {
$op = ($op =~ /^(=|IS)$/)? 'IS': 'IS NOT';
}
elsif ( $value =~ /\D/ ) {
More information about the Rt-commit
mailing list