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:59:43 +0000 (12:59 -0400)
commit029a7a36aa10371f28eb31d7412281d4d3451607
treecdc6d3e9f745943acd24e5173cf18215d799273a
parent8d578c3dfff71f0bfb2986cf2ca6c2caa12d88a5
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