Bug 13442: Facet links broken when collection code limit is used
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 11 Dec 2014 14:47:01 +0000 (09:47 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 30 Apr 2015 19:44:34 +0000 (16:44 -0300)
Any search limits including a ccode will break the search facts.

Test Plan:
1) Run an advanced search using a ccode limit
2) Try using any of the facet links of the left
3) Note they are broken
4) Apply this patch
5) Refresh the results
6) Note the facet links are no longer broken

Note: I have not been able to reproduce this issue on my own test
system, but have noted the problem on at least a dozen Koha servers.

I could not reproduce the bug either, but I saw it on the Bywater Demo (comment #1).
Applied patch and tested facets, no problems found, signing off
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Can not reproduce the problem, but I can also not find a regression.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Search.pm

index 8d110c1..686f386 100644 (file)
@@ -1711,7 +1711,7 @@ sub buildQuery {
             if ( $k !~ /mc-i(tem)?type/ ) {
                 # in case the mc-ccode value has complicating chars like ()'s inside it we wrap in quotes
                 $this_limit =~ tr/"//d;
-                $this_limit = $k.":\"".$v."\"";
+                $this_limit = $k.":'".$v."'";
             }
 
             $group_OR_limits{$k} .= " or " if $group_OR_limits{$k};