Bugzilla – Attachment 120333 Details for
Bug 27565
Dropdowns in Item Search should be sorted alphabetically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27565: Add sorting to search_by_koha_field
Bug-27565-Add-sorting-to-searchbykohafield.patch (text/plain), 1.35 KB, created by
Martin Renvoize
on 2021-04-30 12:27:19 UTC
(
hide
)
Description:
Bug 27565: Add sorting to search_by_koha_field
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-04-30 12:27:19 UTC
Size:
1.35 KB
patch
obsolete
>From 1a98b003f40946684404e8e70c60b0314bf98dd5 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 30 Apr 2021 13:25:42 +0100 >Subject: [PATCH] Bug 27565: Add sorting to search_by_koha_field > >This patch adds sorting by 'category', 'lib' and finally 'lib_opac' as >found in other AV search methods. > >Test plan >1 >--- > Koha/AuthorisedValues.pm | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/Koha/AuthorisedValues.pm b/Koha/AuthorisedValues.pm >index b23190da72..b352bd3289 100644 >--- a/Koha/AuthorisedValues.pm >+++ b/Koha/AuthorisedValues.pm >@@ -65,11 +65,14 @@ sub search_by_koha_field { > return unless $kohafield; > > return $self->SUPER::search( >- { 'marc_subfield_structures.frameworkcode' => $frameworkcode, >+ { >+ 'marc_subfield_structures.frameworkcode' => $frameworkcode, > 'marc_subfield_structures.kohafield' => $kohafield, >- ( defined $category ? ( category_name => $category ) : () ), >+ ( defined $category ? ( category_name => $category ) : () ), > }, >- { join => { category => 'marc_subfield_structures' }, >+ { >+ join => { category => 'marc_subfield_structures' }, >+ order_by => [ 'category', 'lib', 'lib_opac' ], > distinct => 1, > } > ); >-- >2.20.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 27565
: 120333