[Rt-commit] r2000 - in rt/branches/3.3-TESTING: . lib/RT
lib/t/regression
jesse at bestpractical.com
jesse at bestpractical.com
Thu Dec 16 14:47:28 EST 2004
Author: jesse
Date: Wed Dec 15 18:00:06 2004
New Revision: 2000
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/lib/RT/Tickets_Overlay.pm
rt/branches/3.3-TESTING/lib/t/regression/01ticket_link_searching.t
Log:
r2442 at hualien: jesse | 2004-12-15T22:55:54.557052Z
Clkao found a logic bug in the negative link searching
Modified: rt/branches/3.3-TESTING/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Tickets_Overlay.pm (original)
+++ rt/branches/3.3-TESTING/lib/RT/Tickets_Overlay.pm Wed Dec 15 18:00:06 2004
@@ -339,10 +339,6 @@
if ( $op eq '=' || $op =~ /^is/oi ) {
if ( $value eq '' || $value =~ /^null$/io ) {
$is_null = 1;
- # When doing null searches, we need to turn everything around. WHY?
- my $tmp = $linkfield;
- $linkfield = $matchfield;
- $matchfield = $tmp;
}
elsif ( $value =~ /\D/o ) {
$is_local = 0;
Modified: rt/branches/3.3-TESTING/lib/t/regression/01ticket_link_searching.t
==============================================================================
--- rt/branches/3.3-TESTING/lib/t/regression/01ticket_link_searching.t (original)
+++ rt/branches/3.3-TESTING/lib/t/regression/01ticket_link_searching.t Wed Dec 15 18:00:06 2004
@@ -71,13 +71,13 @@
# Now we find a collection of all the tickets which have no members. they should have no children.
$Collection = RT::Tickets->new($CurrentUser);
$Collection->LimitHasMember('');
-# must contain parent; must not contain child
+# must contain child; must not contain parent
my %has;
while (my $t = $Collection->Next) {
++$has{$t->id};
}
-ok ($has{$parentid} , "The collection has our parent - $parentid");
-ok( !$has{$childid}, "The collection doesn't have our child - $childid");
+ok ($has{$childid} , "The collection has our child - $childid");
+ok( !$has{$parentid}, "The collection doesn't have our parent - $parentid");
@@ -85,13 +85,13 @@
# Now we find a collection of all the tickets which are not members of anything. they should have no parents.
$Collection = RT::Tickets->new($CurrentUser);
$Collection->LimitMemberOf('');
-# must not contain parent; must contain parent
+# must contain parent; must not contain child
%has = ();
while (my $t = $Collection->Next) {
++$has{$t->id};
}
-ok (!$has{$parentid} , "The collection has our parent - $parentid");
-ok( $has{$childid}, "The collection doesn't have our child - $childid");
+ok ($has{$parentid} , "The collection has our parent - $parentid");
+ok( !$has{$childid}, "The collection doesn't have our child - $childid");
# Do it all over with TicketSQL
@@ -107,8 +107,8 @@
while (my $t = $Collection->Next) {
++$has{$t->id};
}
-ok ($has{$parentid} , "The collection has our parent - $parentid");
-ok( !$has{$childid}, "The collection doesn't have our child - $childid");
+ok (!$has{$parentid} , "The collection doesn't have our parent - $parentid");
+ok( $has{$childid}, "The collection has our child - $childid");
# Now we find a collection of all the tickets which have no members. they should have no children.
@@ -120,8 +120,8 @@
while (my $t = $Collection->Next) {
++$has{$t->id};
}
-ok ($has{$parentid} , "The collection has our parent - $parentid");
-ok( !$has{$childid}, "The collection doesn't have our child - $childid");
+ok (!$has{$parentid} , "The collection doesn't have our parent - $parentid");
+ok( $has{$childid}, "The collection has our child - $childid");
@@ -133,8 +133,8 @@
while (my $t = $Collection->Next) {
++$has{$t->id};
}
-ok (!$has{$parentid} , "The collection has our parent - $parentid");
-ok( $has{$childid}, "The collection doesn't have our child - $childid");
+ok ($has{$parentid} , "The collection has our parent - $parentid");
+ok(!$has{$childid}, "The collection doesn't have our child - $childid");
# Now we find a collection of all the tickets which are not members of anything. they should have no parents.
@@ -145,8 +145,8 @@
while (my $t = $Collection->Next) {
++$has{$t->id};
}
-ok (!$has{$parentid} , "The collection has our parent - $parentid");
-ok( $has{$childid}, "The collection doesn't have our child - $childid");
+ok ($has{$parentid} , "The collection has our parent - $parentid");
+ok(!$has{$childid}, "The collection doesn't have our child - $childid");
More information about the Rt-commit
mailing list