Bug 11923: fix option to sort contents of MARC record batches by citation descending
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 11 Mar 2014 14:34:40 +0000 (10:34 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 13 Mar 2014 15:10:56 +0000 (15:10 +0000)
commit183d4a55ca7877ae5bf7eb8399bf37dc954117e4
tree9662ee1b5d8f2add9cd912eb6fa2130c8277bcde
parente34508744d3e76827e911531a56f84731a669784
Bug 11923: fix option to sort contents of MARC record batches by citation descending

When the ability to stage authority records was added to Koha, sorting
record batches by citation ( i.e. title ) caused the addition of
"authorized_heading" to be added to the sort. When sorting by title
descending, this causes the order by clause to be "title,
authorized_heading DESC" which means sort by title ASC, then
authorized_heading DESC. This is incorrect and causes regular biblio
batches to always be sorted ascending.

Test plan:
1) Stage a batch of biblio records from a file
2) View the staged batch
3) Attempt to sort by title descending
4) Note it is still sorted by title ascending
5) Apply this patch
6) Note the sorting now works correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. The code pertaining to sorting in routine
GetImportRecordsRange will probably not win beauty prizes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/ImportBatch.pm