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:59:53 +0000 (12:59 -0400)
commitce528a38b793eda988f8bca31b09e42339217061
tree9a7aa5d30aed4a9dcb4bf8eba1f915a6c16e0be2
parent647d0db2f0975dc48d7df6552d17e55b325b6e90
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