Bug 8657 - Default sort by call number does not work
authorOwen Leonard <oleonard@myacpl.org>
Mon, 20 Aug 2012 14:59:26 +0000 (10:59 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 29 Aug 2012 15:51:19 +0000 (17:51 +0200)
commite50ba9f220310978002d93063880ce981a651992
treeebe9382a5defe225136857aa8fd8c464919d382c
parent94d170483fefe06df051728880835f196c9f2c78
Bug 8657 - Default sort by call number does not work

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
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref