Bug 8246

Summary: can't delete bibs in big batch delete
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: ToolsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P5 - low CC: chris, jonathan.druart, marjorie.barry-vila, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6027
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11490
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 8246: Allow deleting record if no more items
Bug 8246: Allow deleting record if no more items
[PASSED QA] Bug 8246: Allow deleting record if no more items

Description Nicole C. Engard 2012-06-14 15:12:57 UTC
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 1 Jonathan Druart 2015-03-31 14:36:23 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2015-04-02 14:10:00 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-04-03 13:09:41 UTC
Created attachment 37455 [details] [review]
[PASSED QA] Bug 8246: Allow deleting record if no more items

The "Delete records if no items remain" was only available if the batch
did not contain "too many" items (see MaxItemsForBatch).
This limitation does not make any sense.

Test plan:
1/ Set MaxItemsForBatch=10
2/ Use the batch item deletion to delete 10+ items
3/ Confirm the checkbox "Delete records if no items remain" is displayed
4/ Check it
5/ Launch the job
6/ Run koha qa test tools

Verify that the records without items have been deleted also.

NOTE: My test db only had two biblios with items, so I set
      MaxItemsForBatch=1.
      Before patch, checkbox did not display.
      After patch, checkbox did display.
      This patch merely moves one line out of the IF/ELSE/END
      block, and reindents for more readability. Though, there
      is a missing <p> if you want to get picky.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2015-04-08 14:38:14 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 5 Chris Cormack 2015-04-11 05:31:04 UTC
Pushed to 3.18.x will be in 3.18.6