Bugzilla – Attachment 136612 Details for
Bug 29922
Group of libraries are now displayed in alphabetical order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29922: Make get_search_groups return results sorted by title
Bug-29922-Make-getsearchgroups-return-results-sort.patch (text/plain), 1.41 KB, created by
Shi Yao Wang
on 2022-06-27 15:32:03 UTC
(
hide
)
Description:
Bug 29922: Make get_search_groups return results sorted by title
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2022-06-27 15:32:03 UTC
Size:
1.41 KB
patch
obsolete
>From b55bcec4df33ac9f7cd8a197d44158ca764f8662 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Mon, 27 Jun 2022 11:18:05 -0400 >Subject: [PATCH] Bug 29922: Make get_search_groups return results sorted by > title >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >get_search_groups from Koha/Library/Groups.pm returns library groups sorted by title. > >Test plan: >1- Go to administration > library groups and create multiple library groups with different names (e.g. AGroup, BGroup, ÃGroup, etc.). Make sure to tick "Use for OPAC search groups" checkbox. >2- Go to advanced search in OPAC. >3- Under "Groups of librairies" , click the select button. >4- Notice that the library groups are not in alphabetical order. >5- Apply the patch. >6- Notice that the library groups are in alphabetical order. >7- Run `prove t/db_dependent/LibraryGroups.t` and all test should pass. >--- > Koha/Library/Groups.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Library/Groups.pm b/Koha/Library/Groups.pm >index 6b251fdbfa..f8f8e221e6 100644 >--- a/Koha/Library/Groups.pm >+++ b/Koha/Library/Groups.pm >@@ -61,7 +61,7 @@ sub get_search_groups { > > my $field = $interface eq 'staff' ? 'ft_search_groups_staff' : 'ft_search_groups_opac'; > >- return $self->search( { $field => 1 } ); >+ return $self->search( { $field => 1 }, { order_by => 'title' } ); > } > > >-- >2.25.1
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 29922
:
129698
|
129699
|
129737
|
129738
|
130767
|
131343
|
131444
|
136612
|
137045
|
137063
|
137064
|
137325
|
137326
|
137405
|
137406