From 5998fe93f5a7fe5fa2b55fc18b94e68e99f2a879 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 18 Dec 2023 19:05:10 +0000 Subject: [PATCH] Bug 35538: Sort OPAC self registration library list by library name This patch modifies opac-memberentry.pl so that the list of libraries is sorted by library name instead of library code. To test, apply the patch and restart services. - If using the default testing data you'll have to go to Administration -> Libraries and edit one or more libraries so that the library name is alphabetically different than the library code. e.g. Centerville -> Zanzibar. - Go the OPAC and click "Create an account" (requires the PatronSelfRegistration system preference). - Under "Home library," the dropdown of libraries should be ordered by library name. Signed-off-by: David Nind Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer --- opac/opac-memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 6b08e19c56..279417431d 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -89,7 +89,7 @@ if ( $op eq 'cud-create' || $op eq 'new' ) { $params = { branchcode => { -in => \@PatronSelfRegistrationLibraryList } } if @PatronSelfRegistrationLibraryList; } -my $libraries = Koha::Libraries->search($params); +my $libraries = Koha::Libraries->search( $params, { order_by => ['branchname'] } ); my ( $min, $max ) = Koha::Policy::Patrons::Cardnumber->get_valid_length(); if ( defined $min ) { -- 2.20.1