Bugzilla – Attachment 11716 Details for
Bug 8657
Default sort by call number does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8657 - Default sort by call number does not work
Bug-8657---Default-sort-by-call-number-does-not-wo.patch (text/plain), 3.25 KB, created by
Liz Rea
on 2012-08-20 21:00:38 UTC
(
hide
)
Description:
Bug 8657 - Default sort by call number does not work
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2012-08-20 21:00:38 UTC
Size:
3.25 KB
patch
obsolete
>From 7567055f8e400069e0f99e9c64f7b6704cda2e18 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 20 Aug 2012 10:59:26 -0400 >Subject: [PATCH] Bug 8657 - Default sort by call number does not work >Content-Type: text/plain; charset="utf-8" > >If you choose to sort search results in the OPAC or staff >client by call number by default, the wrong value will >be saved by the system preferences editor. It should be >"call_number" instead of "callnumber." This patch >corrects the pref file and updates the database in cases >where defaultSortField or OPACdefaultSortField are >set to the incorrect value for call number sort. > >To test: Set defaultSortField and/or OPACdefaultSortField >to "call number" and perform a search. Results will be >sorted by relevance. Apply the patch, update the database, >and search again. Results should now be sorted by call number. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >with the caveat that this will not fix the issue unless the sort order is first set to descending and back to ascending per bug 8012. > >However, with the sort order set to a proper sort value, this patch does fix the issue. >--- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../en/modules/admin/preferences/searching.pref | 4 ++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index ed0c674..5b90e49 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5635,6 +5635,14 @@ if(C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.09.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("UPDATE systempreferences SET value = 'call_number' WHERE variable = 'defaultSortField' AND value = 'callnumber'"); >+ $dbh->do("UPDATE systempreferences SET value = 'call_number' WHERE variable = 'OPACdefaultSortField' AND value = 'callnumber'"); >+ print "Upgrade to $DBversion done (Bug 8657 - Default sort by call number does not work. Correcting system preference value.)\n"; >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >index e324680..5176d52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref >@@ -99,7 +99,7 @@ Searching: > choices: > relevance: relevance > popularity: total number of checkouts >- callnumber: call number >+ call_number: call number > pubdate: date of publication > acqdate: date added > title: title >@@ -131,7 +131,7 @@ Searching: > choices: > relevance: relevance > popularity: total number of checkouts >- callnumber: call number >+ call_number: call number > pubdate: date of publication > acqdate: date added > title: title >-- >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 8657
:
11704
| 11716