Bugzilla – Attachment 105681 Details for
Bug 25701
Facets display in random order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25701: (bug 14419 follow-up) Always display facet groups in the same order
Bug-25701-bug-14419-follow-up-Always-display-facet.patch (text/plain), 1.50 KB, created by
David Nind
on 2020-06-10 10:25:35 UTC
(
hide
)
Description:
Bug 25701: (bug 14419 follow-up) Always display facet groups in the same order
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-06-10 10:25:35 UTC
Size:
1.50 KB
patch
obsolete
>From 6bf92fcb4618084b265f054528fbf1720cafacde Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 Jun 2020 12:03:20 +0200 >Subject: [PATCH] Bug 25701: (bug 14419 follow-up) Always display facet groups > in the same order > >It seems that this regression comes from bug 14419, but I have not found >a logic reason behind that. >This patch restores the behaviour we always had: facet groups must be >displayed in a given order: the Zebra index (au, ccode, holdingbranch, >etc.) > >Test plan: >Apply this patch, restart all and confirm that the facets are not moving >up and down when you refresh your search result page. > >QA note: >I think the following line must be removed >@facets_loop = sort {defined $a->{expand} && defined $b->{expand} && $a->{expand} cmp $b->{expand}} @facets_loop; > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Search.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index cd9b8923bd..9d4f64e268 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -487,8 +487,7 @@ sub getRecords { > # BUILD FACETS > if ( $servers[ $i - 1 ] =~ /biblioserver/ ) { > for my $link_value ( >- sort { $facets_counter->{$b} <=> $facets_counter->{$a} } >- keys %$facets_counter >+ sort { $a cmp $b } keys %$facets_counter > ) > { > my @this_facets_array; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25701
:
105679
|
105681
|
105682
|
105683