Bug 18071: Add authorities maintenance script
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 7 Feb 2017 12:59:33 +0000 (13:59 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 10 Jan 2018 19:44:12 +0000 (16:44 -0300)
commitace03864ba716cf3a6a3df6f57a84bbf8bd06570
tree9989525569c7f7120d8e25dc689857b6b4072ccf
parentcfed10325bc2de3b207606f6c87940ac3b67e303
Bug 18071: Add authorities maintenance script

With bug 9988 the manual merge option of merge_authorities was removed.
(Note that it did not work any more too.) This patch reintroduces this
functionality on the command line.

This maintenance script now allows you to force renumbering field 001 for
selected authid's, to delete authid's including the removal of references
in biblio records, as well as merging several authid's into one reference
record.

Test plan:
[1] Test the -renumber parameter. Field 001 and 005 should be updated.
[2] Test the -delete parameter. Check if a linked biblio does no longer
    contain a reference to the deleted authority.
[3] Test the -merge parameter.
    Create two PERSO_NAME records (say A,B) and attach biblios to them.
    Pick a CORPO_NAME record as reference record C.
    Now pass -merge -reference C -authid A,B
    Verify that A and B are gone, and the records link to C now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/maintenance/update_authorities.pl [new file with mode: 0755]