We've been requested to develop a cronjob to clear out bibliographic records with no items. This could be useful if there's a duplicate record where items are being attached, so the other record is empty and not being used in Koha, just crowding search results.
It'd be great if this included some way to exclude some itemless bibs, for libraries that include bibs for ebooks without attached item records. Maybe an option to exclude certain biblio-itemtypes from the deletion? Or to exclude bibs with something in the 856?
There are actually quite a lot of cases that come to mind, where a record has no items but is still wanted/needed: * Set type records for multi-volumes * Series type records for traced series * Records where the item is linked using EasyAnalytics * Analytical records using 773 standard linking * Serials where the library has subscriptions and issues, but doesn't create items * Acquisition records where the library doesn't attach items or new standing order records * Electronic resources - 856 might not be best, as it could also be some other type of content enrichment like a scanned TOC. Maybe 007, Pos. 0? https://www.loc.gov/marc/bibliographic/bd007.html Maybe an option: add a --WHERE SQL condition option to the existing batchdeletebiblios.pl. This way it would allow libraries to easily specifiy "has no items", without going into the rabbit hole of discussing all the above cases. Keeping it simple.
Locally we handle this scenario using a custom report page where librarians can review bib records with no items attached. They'll often exclude electronic resources by item type. It's a more manual process than a cronjob, but it's less error prone I think.
Thanks all for your discussion. I ended up using cronjobs/runreport.pl to run a report fetching the biblionumbers of biblios with no items, piping those results into a file, then giving that file to batchdeletebiblios.pl. I'll close this bug report now.