Matrix search should be AND based, not OR. Fixes bug #11301

This commit is contained in:
Colin Kuskie 2009-12-10 12:57:45 -08:00
parent c8d6f12629
commit 4b65b441e0
2 changed files with 4 additions and 0 deletions

View file

@ -6,6 +6,7 @@
- fixed #11294: Matrix - Best/Worse Rated Calculations
- fixed getIsa returns undef for pending assets
- fixed #11299: Matrix - Cannot hide title
- fixed #11293: Matrix - Search not working correctly
7.8.7
- fixed #11278: Wrong test for Template::Toolkit in testEnvironment.pl

View file

@ -1195,13 +1195,16 @@ sub www_getCompareFormData {
where listing.matrixListingId = ?
and attributeId IN(".$searchParamList.")",
[$result->{assetId}],'attributeId');
##Searching is AND based.
PARAM: foreach my $param (@searchParams_sorted) {
my $fieldType = $matrixListing_attributes->{$param->{attributeId}}->{fieldType};
my $listingValue = $matrixListing_attributes->{$param->{attributeId}}->{value};
if(($fieldType eq 'MatrixCompare') && ($listingValue < $param->{value})){
$checked = '';
last PARAM;
}
elsif(($fieldType ne 'MatrixCompare' && $fieldType ne '') && ($param->{value} ne $listingValue)){
$checked = '';
last PARAM;
}
else{