From 0f63a76f4e1919d0c3237a6a71710eef3a1c9392 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 18 Dec 2018 18:30:28 +0000 Subject: [PATCH] Bug 22022: Correct ordering for authorised values To test: 1 - Add a shelving location with code "ZZZZ" and lib "Awake" 2 - Load some items in batch modification 3 - Note shelving location dropdown is wrong 4 - Apply patch 5 - Reload page 6 - Note order is correct Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit e6cec898e078fc04d87e2faf26badba10fa6f348) Signed-off-by: Martin Renvoize (cherry picked from commit 4aaaf2eecd8cb3e269c4543385ecebb5531eef17) Signed-off-by: Lucas Gass --- tools/batchMod.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index fb6cb7ca1f..741782963f 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -398,7 +398,7 @@ foreach my $tag (sort keys %{$tagslib}) { else { push @authorised_values, ""; # unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); - my @avs = Koha::AuthorisedValues->search({ category => $tagslib->{$tag}->{$subfield}->{authorised_value}, branchcode => $branch_limit }); + my @avs = Koha::AuthorisedValues->search({ category => $tagslib->{$tag}->{$subfield}->{authorised_value}, branchcode => $branch_limit },{order_by=>'lib'}); for my $av ( @avs ) { push @authorised_values, $av->authorised_value; $authorised_lib{$av->authorised_value} = $av->lib; -- 2.39.5