Bug 11084 - Delete biblios on Leader 05 == d
authorKyle M Hall <kyle@bywatersolutions.com>
Sun, 20 Oct 2013 18:02:52 +0000 (14:02 -0400)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Tue, 29 Dec 2015 19:32:19 +0000 (19:32 +0000)
commitcc735a7ca4cfc90f636d8cd0f3a24b09312268bf
treeef81e5bd34f8db7e8f0e92607e78bb0b89a0e425
parent3f6a1d47fd9a72792ce334d1fdce05fa53e7c1a2
 Bug 11084 - Delete biblios on Leader 05 == d

Position 05 of the leader in MARC 21 indicates the record's status.
A lower case 'd' indicates that the record is to be deleted
(http://www.loc.gov/marc/authority/adleader.html).

This patch adds a cronjob script that may be run nightly to delete
records where position 05 of the leader is set to 'd'.

Test Plan:
1) Edit one or more records, and set the leader position 05 to 'd'.
2) Run misc/cronjobs/delete_records_via_leader.pl -c -v
3) Those records should either be deleted, or an error message should
   state why they were not.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised. Edited a record with an item to have leader05 = d,
then ran delete_records_via_leader.pl with -c and got a message that
the record could not be deleted because of the item. Removed the item
and the script deleted the record. Tried with another record with an
item, this time with the -i option and the record was deleted.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
C4/Items.pm
misc/cronjobs/delete_records_via_leader.pl [new file with mode: 0755]