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>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d669694426)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91ad110216)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

(cherry picked from commit dcfb394e03)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
Jonathan Druart 2020-06-10 12:03:20 +02:00 committed by Victor Grousset/tuxayo
parent 879c34aef6
commit 014efe3dd6
1 changed files with 1 additions and 2 deletions

View File

@ -513,8 +513,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;