This needs a lot of testing, I dont think it tests for any reserves on the biblio, before deleting. (Or serial subscriptions etc)
Created attachment 3590 [details] [review] Proposed Patch
When I try to load up the batch bib delete tool I get the following: Software error: Global symbol "$values_to_modify" requires explicit package name at /home/koha/kohaclone/tools/batchMod.pl line 156. Global symbol "$values_to_blank" requires explicit package name at /home/koha/kohaclone/tools/batchMod.pl line 156. Global symbol "$marcitem" requires explicit package name at /home/koha/kohaclone/tools/batchMod.pl line 158. Execution of /home/koha/kohaclone/tools/batchMod.pl aborted due to compilation errors. For help, please send mail to the webmaster (ian.walls@bywatersolutions.com), giving this error message and the time and date of the error.
This bug is mentioned in: Bug 6027 : MT3532: Deletes biblio record when there are no more items left for this biblio while batch item deleting http://lists.koha-community.org/pipermail/koha-patches/2011-March/014413.html
This sounds like an interesting feature Is there a chance to fix the patch in time for 3.6?
*** Bug 5694 has been marked as a duplicate of this bug. ***
Created attachment 7737 [details] [review] Bug 6027 - Delete biblios if deleting all their items in batch deletion Optionally delete bibliographic record when batch deleting items, if no items remain on the record. Adds deleting of reserves to DelBiblio. Since subscriptions are deleted automatically, it made sense for deletion of reserves to maintain the same behavior.
I entered three barcodes in the batch deletion, two were the last items and one was one of many items on the bib record. When I clicked the 'deleted selected items' button I got this error: Software error: Undefined subroutine &C4::Search::SimpleSearch called at /home/nengard/kohaclone/C4/Items.pm line 2465. For help, please send mail to the webmaster (webmaster@debian), giving this error message and the time and date of the error.
Kyle, did denesting strike you?
Created attachment 8235 [details] [review] Bug 6027 - Delete biblios if deleting all their items in batch deletion Optionally delete bibliographic record when batch deleting items, if no items remain on the record. Adds deleting of reserves to DelBiblio. Since subscriptions are deleted automatically, it made sense for deletion of reserves to maintain the same behavior.
Created attachment 8239 [details] [review] Bug 6027 - Delete biblios if deleting all their items in batch deletion Optionally delete bibliographic record when batch deleting items, if no items remain on the record. Adds deleting of reserves to DelBiblio. Since subscriptions are deleted automatically, it made sense for deletion of reserves to maintain the same behavior. Signed-off-by: Liz Rea <wizzyrea@gmail.com> I like the way this works, and it does. Passes tests.
Also takes care of that insidious problem with deleting the reserves associated with batch deleted items. The only extra thing I would ask (it can be a followup) is that it report which titles/patrons had holds deleted so that the librarian can notify the patron. Maybe do this on the "delete prep" screen, have a column for reserves and the names of the patrons? That would be easy for staff to print before clicking "delete."
Adds this functionality very cleanly. Marking as Passed QA
I like the way it's made, but have 2 questions: * why do you have added +use C4::Search qw/SimpleSearch/; ? Checking, it seems this sub is used in GetAnalyticsCount, that is not related to this patch (maybe we should add a require C4::Search in this sub and not load it everytime ? * you also add &SimpleSearch into C4::Search, same question : it's not used by this patch, isn't it ?
(In reply to comment #13) My installation was dying with errors on master, and these edits fixed it. I'm not sure why. I can remove them if you think that would be best. > I like the way it's made, but have 2 questions: > * why do you have added +use C4::Search qw/SimpleSearch/; ? Checking, it > seems this sub is used in GetAnalyticsCount, that is not related to this > patch (maybe we should add a require C4::Search in this sub and not load it > everytime ? > * you also add &SimpleSearch into C4::Search, same question : it's not used > by this patch, isn't it ?
Created attachment 8733 [details] [review] Bug 6027 created Bug 7847 This change fixes Bug 7847 without other changes, but I'm at loss why.
This bug seems to be prefered solution to fix Bug 7847 - OPAC search dies with plack - see discussion there.
I'm going to have to add to this. The feature works, but only on small batches I saved the report of withdrawn titles, and when I ran it I got a message saying the list was too long to display individual barcodes, but all titles would be deleted. I did not get the checkbox with the choice of "Delete records if no items remain". I do see this checkbox is I'm loading in a smaller file though.
Nicole, could you open a new bug for this problem and put it in the see also on this bug? Thanks, Kyle (In reply to comment #17) > I'm going to have to add to this. The feature works, but only on small > batches > > I saved the report of withdrawn titles, and when I ran it I got a message > saying the list was too long to display individual barcodes, but all titles > would be > deleted. I did not get the checkbox with the choice of "Delete records if no > items remain". > > I do see this checkbox is I'm loading in a smaller file though.
Done
There have been no further reports of problems so I am marking this bug resolved.