summaryrefslogtreecommitdiffstats
path: root/xt/lib/Bugzilla/Test/Search/FieldTest.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-05 07:55:23 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-05 07:55:23 +0200
commitdaa533e7c6d1c6ff2e8600c5178ac75bf7a2538c (patch)
tree24553b5935a2317439a031ca1d4543c905b1b63b /xt/lib/Bugzilla/Test/Search/FieldTest.pm
parente861a6de8f1310f99c1b04c64513c7b8633d2b9b (diff)
downloadbugzilla-daa533e7c6d1c6ff2e8600c5178ac75bf7a2538c.tar.gz
bugzilla-daa533e7c6d1c6ff2e8600c5178ac75bf7a2538c.tar.xz
Bug 601848: Fix percentage_complete searches for all operators on both MySQL
and PostgreSQL r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'xt/lib/Bugzilla/Test/Search/FieldTest.pm')
-rw-r--r--xt/lib/Bugzilla/Test/Search/FieldTest.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
index 3e7fd2521..532936e91 100644
--- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm
+++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
@@ -166,7 +166,9 @@ sub transformed_value_was_equal {
sub bug_is_contained {
my ($self, $number) = @_;
my $contains = $self->test->{contains};
- if ($self->transformed_value_was_equal($number)) {
+ if ($self->transformed_value_was_equal($number)
+ and !$self->test->{override}->{$self->field}->{contains})
+ {
$contains = $self->test->{if_equal}->{contains};
}
return grep($_ == $number, @$contains) ? 1 : 0;
@@ -482,11 +484,6 @@ sub _substr_value {
$substr_size += length($field);
}
my $string = substr($value, 0, $substr_size);
- # Make percentage_complete substrings strings match integers uniquely,
- # by searching for the full decimal number.
- if ($field eq 'percentage_complete' and length($string) < $substr_size) {
- $string .= ".000";
- }
return $string;
}
return substr($value, $substr_size);