Bugzilla – Attachment 20827 Details for
Bug 10656
shelving locations not alpha on search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10656: (follow-up) handle OPAC sorting of authvals where lib_opac is NULL
Bug-10656-follow-up-handle-OPAC-sorting-of-authval.patch (text/plain), 2.21 KB, created by
Kyle M Hall (khall)
on 2013-09-06 15:24:33 UTC
(
hide
)
Description:
Bug 10656: (follow-up) handle OPAC sorting of authvals where lib_opac is NULL
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-09-06 15:24:33 UTC
Size:
2.21 KB
patch
obsolete
>From f5ce672fbec5eb449924ee0b4c16bb92e4cbe4c6 Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Tue, 20 Aug 2013 17:18:13 +0000 >Subject: [PATCH] Bug 10656: (follow-up) handle OPAC sorting of authvals where lib_opac is NULL > >The OPAC description for an authorized value is not required to be >populated. In particular, if it is NULL, the staff description is >displayed instead. > >This match makes sure that the sort order (in OPAC mode) uses either >the staff description or the OPAC description as needed for each >value. > >To test: > >[1] Make sure that AdvancedSearchTypes includes "ccode" >[1] Arrange your CCODE values so the sort order for staff labels > is different from the sort order for OPAC descriptions. Also, > ensure that one of the OPAC descriptions is NULL. For example, > > authorised_value | lib | lib_opac > -------------------------------------- > ZZZ | A_STAFF | Z_PUBLIC > DDD | D_STAFF | NULL > AAA | Z_STAFF | A_PUBLIC > >[2] Prior to the patch, any CCODE values where the OPAC description > is NULL will sort first in the OPAC advanced search page, even > if the displayed label shouldn't come first. >[3] Apply the patch. >[4] Verify that the collection list on the OPAC advanced search page > is now correct. >[5] Verify that the sort order on the staff advanced search page > has not changed. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works nicely, tested in staff and OPAC. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Koha.pm | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 5deb61b..8429eac 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -1076,7 +1076,11 @@ sub GetAuthorisedValues { > if(@where_strings > 0) { > $query .= " WHERE " . join(" AND ", @where_strings); > } >- $query .= " GROUP BY lib ORDER BY category, " . ($opac ? "lib_opac, lib" : "lib, lib_opac"); >+ $query .= " GROUP BY lib"; >+ $query .= ' ORDER BY category, ' . ( >+ $opac ? 'COALESCE(lib_opac, lib)' >+ : 'lib, lib_opac' >+ ); > > my $sth = $dbh->prepare($query); > >-- >1.7.2.5
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 10656
:
19978
|
19979
|
20039
|
20040
|
20502
|
20507
|
20508
|
20509
|
20512
|
20513
|
20514
|
20825
|
20826
| 20827