]> git.evergreen-ils.org Git - Evergreen.git/commit
Basic call-number sorting by classification scheme
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 7 Aug 2010 03:53:01 +0000 (03:53 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 7 Aug 2010 03:53:01 +0000 (03:53 +0000)
commit37cfe0916caee78838bbe276a494b184e24ff96a
tree00afb00cc1b0455077f4b0cd9d7a3d79f801700f
parentb460b6f83baebdf1f8593a9dabc0d3c3915921e8
Basic call-number sorting by classification scheme

Until now, call numbers like 'K 22 .U748 v.18' and 'K 215 .E53 W37 1997' would
sort incorrectly in Evergreen, making call number browsing painful.

The following patch adds the following to Evergreen to support better call
number sorting:

  * asset.call_number gains two new columns:
    - label_class - identifies the classification scheme for the given callnumber
    - label_sortkey - holds the normalized callnumber suitable for sorting

  * a new table, asset.call_number_class, which holds the names of each
    classification scheme and the name of the assorted normalization function

  * implementations of three normalization functions:
    * a generic normalizer
    * a  Dewey Decimal Classification normalizer (courtesy the Koha project)
    * an LC classification normalizer (courtesy Bill Dueber's Library::CallNumber::LC)

  * a routine in Makefile.install to checkout and install Library::CallNumber::LC

  * call number sorting routines were modified to use label_sortkey instead of
    label, where I could find them

  * corresponding changes to fm_IDL.xml for the new columns + table

A suggested means for applying this to an existing library would be to issue
update statements against asset.call_number setting label_class to the value
in asset.call_number_class that corresponds to owning_lib's scheme, for example:

UPDATE asset.call_number SET label_class = 3 WHERE owning_lib IN (4,5);

We need to teach the staff client holdings maintenance interfaces how to set
the classification scheme for a given call number, and we should also create
an org_unit setting that can set the preferred default classification scheme
that the staff client should inherit. Or maybe we could just make that a
sticky value and have a BEFORE trigger check the incoming value of label_class
and only set it to the org_unit default value if it is NULL (to support bulk
loads).

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17130 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/extras/Makefile.install
Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/040.schema.asset.sql
Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql [new file with mode: 0644]