[Koha-bugs] [Bug 10421] Add cron script to delete deleted records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 9 14:42:22 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10421

--- Comment #4 from Magnus Enger <magnus at enger.priv.no> ---
Created attachment 20220
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20220&action=edit
Bug 10421 - [SIGNED-OFF] Add cron script to delete deleted records

This script will batch delete all records where the leader's record
status ( position 5 ) is set to 'd' ( Deleted ).

Test Plan:
1) Edit a few records, set the leader 05 to 'd' for deleted
2) Run delete_deleted_records.pl
3) Records that are deletable should be deleted!

Signed-off-by: Magnus Enger <magnus at enger.priv.no>
I can confirm that NORMARC uses leader position 5 in the same way
as MARC21, and as far as I can see from this document, UNIMARC does too:
http://archive.ifla.org/VI/8/unimarc-concise-bibliographic-format-2008.pdf

-h and --help as well as running the script without arguments give a
nice "help" message

-c and --confirm makes the script do its job

Records with leader position 5 = d are deleted. If there are items
attached to the record, an error is reported:
Deleting biblionumber 562 ... ERROR:  ( | This Biblio has items
attached, please delete them first before deleting this biblio )

Looks good!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list