Bug 6027 - Delete biblios if deleting all their items in batch deletion
Summary: Delete biblios if deleting all their items in batch deletion
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: 3.8
Hardware: All All
: P4 enhancement
Assignee: Kyle M Hall
QA Contact: Bugs List
URL:
Keywords:
: 5694 (view as bug list)
Depends on:
Blocks: 8149 5992
  Show dependency treegraph
 
Reported: 2011-03-31 20:59 UTC by Chris Cormack
Modified: 2013-12-05 20:04 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed Patch (4.75 KB, patch)
2011-03-31 21:01 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 6027 - Delete biblios if deleting all their items in batch deletion (7.25 KB, patch)
2012-02-17 15:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 6027 - Delete biblios if deleting all their items in batch deletion (7.38 KB, patch)
2012-03-16 16:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 6027 - Delete biblios if deleting all their items in batch deletion (7.51 KB, patch)
2012-03-16 17:22 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 6027 created Bug 7847 (669 bytes, patch)
2012-03-31 01:31 UTC, Dobrica Pavlinusic
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2011-03-31 20:59:44 UTC
This needs a lot of testing, I dont think it tests for any reserves on the biblio, before deleting. (Or serial subscriptions etc)
Comment 1 Chris Cormack 2011-03-31 21:01:38 UTC Comment hidden (obsolete)
Comment 2 Nicole C. Engard 2011-03-31 21:36:02 UTC
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.
Comment 3 MJ Ray (software.coop) 2011-04-04 08:10:02 UTC
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
Comment 4 Katrin Fischer 2011-09-19 10:43:10 UTC
This sounds like an interesting feature 
Is there a chance to fix the patch in time for 3.6?
Comment 5 Katrin Fischer 2011-09-21 14:19:07 UTC
*** Bug 5694 has been marked as a duplicate of this bug. ***
Comment 6 Kyle M Hall 2012-02-17 15:28:23 UTC Comment hidden (obsolete)
Comment 7 Nicole C. Engard 2012-03-16 15:13:59 UTC
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.
Comment 8 Liz Rea 2012-03-16 15:29:11 UTC
Kyle, did denesting strike you?
Comment 9 Kyle M Hall 2012-03-16 16:08:25 UTC Comment hidden (obsolete)
Comment 10 Liz Rea 2012-03-16 17:22:31 UTC
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.
Comment 11 Liz Rea 2012-03-16 18:00:14 UTC
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."
Comment 12 Ian Walls 2012-03-16 19:58:06 UTC
Adds this functionality very cleanly.  Marking as Passed QA
Comment 13 Paul Poulain 2012-03-19 15:53:46 UTC
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 ?
Comment 14 Kyle M Hall 2012-03-21 13:50:07 UTC
(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 ?
Comment 15 Dobrica Pavlinusic 2012-03-31 01:31:52 UTC Comment hidden (obsolete)
Comment 16 Dobrica Pavlinusic 2012-04-04 14:11:33 UTC
This bug seems to be prefered solution to fix Bug 7847 - OPAC search dies with plack - see discussion there.
Comment 17 Nicole C. Engard 2012-06-14 12:17:39 UTC
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.
Comment 18 Kyle M Hall 2012-06-14 13:11:37 UTC
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.
Comment 19 Nicole C. Engard 2012-06-14 15:13:28 UTC
Done
Comment 20 Jared Camins-Esakov 2012-12-31 01:06:15 UTC
There have been no further reports of problems so I am marking this bug resolved.