Prevent control numbers from duplicating user/dbs/oclcnumbers
authorDan Wells <dbw2@calvin.edu>
Thu, 21 Jul 2011 16:14:02 +0000 (12:14 -0400)
committerDan Scott <dan@coffeecode.net>
Thu, 21 Jul 2011 16:34:04 +0000 (12:34 -0400)
commite411a2c1c352a3331078c17d7ba296310b3faf3e
tree2ce7cbd85bf4c5195682e4c07f8126c0d3d44c7d
parenteec618b3356f1012216771053dcea4583e79aa4b
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