Bug 9149: Add missing GetAuthorizedHeading
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 29 Nov 2012 20:11:00 +0000 (15:11 -0500)
committerChris Cormack <chris@bigballofwax.co.nz>
Sun, 2 Dec 2012 06:15:09 +0000 (19:15 +1300)
commit91116d70d0e2a79849cbc2e2f96d5d7f834c5ef5
tree0753357188072099ffd95370f78fb1605c0fa325
parentd3c5e317f14ff0167bb65916d1027886107420c9
Bug 9149: Add missing GetAuthorizedHeading

On 3.8.x, it was possible for multiple automatically generated
authorities to be linked to a single heading. This patch deletes
previous links from headings prior to linking them to
automatically-generated headings. This patch also corrects a
potential problem wherein multiple authorities might be generated if
a record is edited repeatedly in quick succession. The latter problem
exists on Master and 3.6.x as well, and the code that corrects the
multiple linkages is equally applicable if seemingly unnecessary.

This patch adds a missing routine to C4::AuthoritiesMarc that should
have been in the 3.8.x version of the patch for bug 8823.

To test:
1) Turn on BiblioAddsAuthorities and AutoCreateAuthorities.
2) Create a new record or edit an existing one, and add an
   authority-controlled heading (for example, MARC21 1xx or 6xx or
   UNIMARC 6xx or 7xx) which does not currently exist in your authority
   file.
3) If you don't get a software error, it worked.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
For 2) you can also download a record over Z39.50.
Passes all tests.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
C4/AuthoritiesMarc.pm