Currently the export_records.pl script has an option to export a list of deleted items, but not deleted biblios. There are cases where such an export would seem useful (at Aristotle University of Thessaloniki we have been using it for a long time), the data is already kept in the deletedbiblio table, so the enhancement is easy to implement as it only requires a couple lines of code in the export script.
Created attachment 57807 [details] [review] Add option to export deleted bibs in export_records.pl This commit adds an additional option to the export_records.pl script, so that users will be able to get a line-seperated list of biblionumbers with records deleted (optionally after a specified date). Test plan: 1/ Apply patch 2/ delete one or more marc records from Koha 3/ from within the ./misc/ folder run: export_records.pl --deleted_bibs --record-type='bibs' You should get a Koha.mrc file with the deleted biblionumbers (one per line). 4/ you may also use '--date' option like so: export_records.pl --deleted_bibs --record-type='bibs' --date="YYYY-MM-DD" This way you should get a filtered list of biblionumbers that were deleted AFTER the specified date.
ps1. My coding style is not so elegant, but I decided to use an approach that makes the least possible changes to the original file. Comments and suggestions for different approaches are welcome. ps2. The patch is not applicable to pre-3.22 Koha versions as-is (because the export script was significantly different), but if required I could provide a backfix (ie for v3.20)
If the only option for retrieving deleted records is to get a text file with one biblionumber per line I don't think it should save a file with the ".mrc" extension. That makes it look like it's a MARC file.
*** This bug has been marked as a duplicate of bug 20551 ***