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

--- Comment #4 from Magnus Enger <[email protected]> ---
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 <[email protected]>
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to