Prevent control numbers from duplicating
authorDan Wells <dbw2@calvin.edu>
Thu, 21 Jul 2011 16:14:02 +0000 (12:14 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 28 Jul 2011 16:51:56 +0000 (12:51 -0400)
commit970eaf77c399bff37f996cf2b6cb65a2e27fd5a7
treee58cb616aa5093c9f672f2c294e5645e6156fc40
parentd0c76061f617277abeefd48e0e2dd5bf43dcf185
Prevent control numbers from duplicating

In maintain_control_numbers(), if you have more than one 001 or
003, and at least one is the correct one, you will end up
duplicating the correct number every time the record is saved.

For example, if the incoming record was record ID # 12345, and
the record contained:

001: 12345
001: ocm10202

... then after maintain_control_numbers() ran, the record would
contain:

001: 12345
001: 12345

Also, clean up some leftovers from the refactor I suggested in the
previous commit.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/002.functions.config.sql
Open-ILS/src/sql/Pg/upgrade/xxxx.maintain_control_numbers_with_OCLC_awareness.sql