Treat OCLC numbers specially in maintain_control_numbers
authorDan Scott <dan@coffeecode.net>
Thu, 21 Jul 2011 14:18:55 +0000 (10:18 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 28 Jul 2011 16:51:48 +0000 (12:51 -0400)
commit186f2d1a8ba17be65a4a26258dc8cba97d8c87af
tree27cfc369ca4cbfa0a4d6603d2f4969a430bc2821
parent1a76ff0d1cc0f60e0a494e537e6d6474d3902fc2
Treat OCLC numbers specially in maintain_control_numbers

For some reason, many records that come with OCLC numbers in the 001
field are not populated with a 003 field. This resulted in the OCLC
number being thrown away entirely, rather than being moved into the 035,
as there was no corresponding control number identifier field.

However, given that we know that control numbers starting with "ocm" or
"ocn" are special OCLC numbers, we can generate the 035 accordingly even
in the absence of a 003. This update to maintain_control_numbers()
teaches it to do the right thing for OCLC numbers.

In addition, add an identifier search index so we can easily find
records by their system control numbers (035 $a subfields).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/sql/Pg/002.functions.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql