Go to file
Jason Etheridge e311ea1308 Bug 9770: fix sorting of Dewey call numbers that contain prefixes
C4::ClassSortRoutine::Dewey can pad the wrong part of a call number internally.

The subroutine get_class_sort_key tokenizes a call number string (splitting on
periods and whitespace) and counts the number of tokens that solely contain
digits.  If there is only one such digit group, a comment in the code states
that it will pad said digit group.  However, the bug is that the code assumes
said digit group is the first token, when this may not be the case.

In practice, this can cause poor sorting when used a call number is in the form
of PREFIX _space_ 3DIGITS.

To test:

[1] Create two item records whose class scheme is set to
    'ddc' (Dewey) and whose call numbers contain prefixes, e.g.,
    J DVD 700.1 ABC and J DVD 850 DEF.
[2] Use the inventory tool to produce a list of item items that include
    the two created in step 1.  Obsere that that items are sorted
    in the incorrect order, with "J DVD 850 DEF" coming before
    "J DVD 700.1 ABC".  Alternatively, run the following SQL
    to see the incorrect sort order:

    SELECT cn_sort, itemcallnumber
    FROM items
    WHERE itemcallnumber LIKE 'J DVD%'
    ORDER BY cn_sort;

[4] Apply this patch.
[5] Run misc/maintenance/touch_all_items.pl to force cn_sort to be
    recalculated.
[6] Repeat step 2 and verify that the call numbers are now sorted
    corrected.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dba36a7a12)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f05642589d)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit f05642589d)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 404a931efa)
2013-08-20 21:15:45 +12:00
C4 Bug 9770: fix sorting of Dewey call numbers that contain prefixes 2013-08-20 21:15:45 +12:00
Koha Bug 9211 - days_between wrong behaviour 2013-02-01 21:41:34 +13:00
acqui Bug 9824: Make it possible to apply/cancel switch 2013-06-17 19:51:02 +12:00
admin Bug 8895 - Warning in systempreferences.pl: Use of uninitialized value in length... 2013-04-21 19:39:29 +12:00
authorities Bug 8744: Thesaurus in authorities should not lock fields 2012-10-04 08:28:02 +13:00
basket Bug 9073 - Download option from the cart should match the menu button in lists 2012-11-26 20:54:37 +13:00
catalogue Bug 7379: display of copy number description (AV) 2013-04-21 12:48:50 +12:00
cataloguing Bug 10448: can now change framework after duplicating bib record 2013-08-20 21:12:58 +12:00
circ Bug 9591 : Set Library changes after viewing Holds Queue >> reserves item 2013-04-25 18:48:30 +12:00
debian Bug 10411: add cache control headers for static resources (Debian package) 2013-08-20 21:03:52 +12:00
docs Bug 7143: Updating history and about page 2013-08-20 21:09:50 +12:00
errors Housekeeping in errors scripts 2010-05-12 07:29:03 -04:00
etc Bug 9804 - Fix name for NORMARC biblio-koha-indexdefs.xml 2013-04-27 21:53:10 +12:00
install_misc Bug 9267 - Ubuntu 12.04 install docs broken 2013-03-11 22:43:09 +13:00
installer Bug 10490: Overdue fines cap can't store decimal values 2013-08-18 17:41:26 +12:00
koha-tmpl Bug 10448: can now change framework after duplicating bib record 2013-08-20 21:12:58 +12:00
labels Bug 8375 - Patch for Common diacritics not shown correctly when exporting batch label to PDF 2012-07-17 17:33:41 +12:00
members Bug 9484: userid not generated consistently (different editing pages) 2013-04-25 09:45:54 +12:00
misc release notes for 3.8.16 2013-07-29 17:23:17 +00:00
offline_circ Bug 8006 - Loading offline circulation does not anonymize 2012-06-23 19:07:11 +12:00
opac Bug 5894: Display all titles when confirming copy of items from cart to list 2013-08-18 16:25:13 +12:00
patroncards Bug 9695 - Use alphabet system preference on page used to browse patrons for patron card batches 2013-03-17 12:32:20 +13:00
reports Bug 8588 [3.8.x] Duplicate field IDs cause problems with SQL report parameter entry 2012-12-08 19:45:09 +13:00
reserve Bug 766: remove CGI::scrolling_list from request.pl 2013-07-18 21:01:18 +12:00
reviews Bug 1623 - Provide view of approved comments 2011-12-27 18:26:50 +01:00
rotating_collections Bug 6553 : Follow up adding license statements 2011-08-13 19:54:38 +12:00
selenium Adding selenium tests for filterMembers 2009-09-30 11:30:37 +02:00
serials Bug 10484: serials-edit.pl not checking for barcode field before checking for barcode subfield 2013-08-18 11:03:25 +12:00
services Bug 7178: Acquisition item creation improvement 2012-03-26 11:07:23 +02:00
skel installer: fixed chown invocation; added skel for KOHA_LOG_DIR 2007-12-17 09:13:53 -06:00
sms Bug 2505 - Add commented use warnings where missing in the sms/ directory 2010-04-21 20:25:08 +12:00
suggestion Bug 9226: Wrong branch filter after suggestion creation 2013-02-16 18:37:25 +13:00
svc Revert "Bug 9908 - Fixing OCLC Connexion Client" 2013-03-30 22:16:59 +13:00
t Bug 9770: test case for sorting of Dewey call numbers that contain prefixes 2013-08-20 21:15:11 +12:00
tags Bug 10022 - Multiple tags moderation doesn't work on translated page 2013-05-08 19:54:16 +12:00
test Bug 5449: JSON malformed in Koha - Blocker with jQuery 1.4.x 2011-03-12 08:53:41 +13:00
tmp/modified_authorities changing DO_NOT_REMOVE to README.txt 2007-10-21 19:14:41 -05:00
tools Bug 9533: batch item modification form now shows default field values only by request 2013-08-18 16:27:55 +12:00
virtualshelves Bug 7788: [SIGNED-OFF] Followup: GetShelf call in addbybiblio script corrected 2012-05-23 16:20:42 +12:00
xt Bug 8942 : Adding a test to make sure we don't use single quotes for js 2013-03-30 08:14:36 +13:00
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap 7439 Mailmap for master 2012-01-27 12:27:58 +01:00
INSTALL Revert "test" 2013-02-14 22:32:10 +13:00
INSTALL.debian Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
INSTALL.fedora7 Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
INSTALL.opensuse Bug 9502 - Wrong destination in cp command (INSTALL.opensuse!) 2013-04-20 22:51:13 +12:00
INSTALL.ubuntu Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
INSTALL.ubuntu.12.04 Bug 9267 - Ubuntu 12.04 install docs broken 2013-03-11 22:43:09 +13:00
INSTALL.ubuntu.lucid Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
LICENSE Update LICENSE with a fresh copy from upstream. This updates the FSF address, and refers to the LGPL with its current name, and changes a few other minor things of the typographical sort. No semantic changes. 2010-03-16 20:17:48 -04:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-09 12:31:59 +13:00
Makefile.PL Bug 8742 - Example uses perl 5.8 in Makefile.PL 2013-04-21 12:46:48 +12:00
README updated links in README 2010-05-24 08:14:16 -04:00
README.robots Bug 6411 add another example to README.robots 2011-07-05 14:48:05 +12:00
about.pl Bug 8910 - silent warnings triggered in about.pl 2012-10-27 14:12:37 +13:00
changelanguage.pl Bug 6755 Problems with switching languages 2011-09-23 09:47:09 +12:00
edithelp.pl Bug 7038 Contextual help is always in English 2011-10-18 16:01:25 +13:00
fix-perl-path.PL installer: improvements to fix-path-perl.PL on Win32 2007-12-20 19:20:12 -06:00
help.pl Bug 8705: Software error on help of main page 2012-09-18 21:50:25 +12:00
install-CPAN.pl Bug 5370: Fix all the references to koha.org 2010-11-08 09:41:49 +13:00
koha_perl_deps.pl Bug 6914 - fixes for the color option of koha_perl_deps.pl 2011-12-03 07:47:38 +01:00
kohaversion.pl Bug 10490: Overdue fines cap can't store decimal values 2013-08-18 17:41:26 +12:00
mainpage.pl Bug 6875 cleaning mainpage.pl 2012-02-15 14:58:31 +01:00
rewrite-config.PL Bug 7818: update installer for biblio DOM indexing 2012-06-26 09:08:30 +12:00

README

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 2 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/