Bug 15357

Summary: Deleting all items on a record with title level holds creates orphaned/ghost holds
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Hold requestsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: brendan, f.demians, gmcharlt, jonathan.druart, julian.maurice, kyle, m.de.rooy, sally.healey
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8132
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14518
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 15357: Display existing holds even if no items exist
[SIGNED-OFF] Bug 15357: Display existing holds even if no items exist
[PASSED QA] Bug 15357: Display existing holds even if no items exist
Bug 15357 [QA Followup] - Remove refereces to biblio and biblionumber for patron messages

Description Nick Clemens (kidclamp) 2015-12-11 20:23:12 UTC
If a record has only title level holds you can delete all items.  The record then shows the holds, but they cannot be accessed using the holds tab.

To recreate:
1 - Place 1 or more title level holds on a record.  
2 - Delete each item individually.
3 - Note that you see the number of holds on the record details page
4 - Note that holds are not accessible via the holds tab
Comment 1 Nick Clemens (kidclamp) 2015-12-11 20:25:09 UTC
This is split from bug 8132 (as per comment #12)
Comment 2 Jonathan Druart 2015-12-14 09:34:54 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens (kidclamp) 2015-12-14 15:39:34 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2015-12-24 09:38:01 UTC
If we do not allow to place a hold on a record without items, wouldn't it be more consistent to delete all title level holds for a biblio when deleting the last item?
Comment 5 Jonathan Druart 2015-12-26 11:02:54 UTC
(In reply to Marcel de Rooy from comment #4)
> If we do not allow to place a hold on a record without items, wouldn't it be
> more consistent to delete all title level holds for a biblio when deleting
> the last item?

In any case, this patch is needed.
Comment 6 Katrin Fischer 2016-01-06 23:00:04 UTC
Created attachment 46376 [details] [review]
[PASSED QA] Bug 15357: Display existing holds even if no items exist

If all the items have been deleted for a record and holds exist, the
holds are not displayed.
You are not able to delete the items from the record detail page, but
you can from the items page.

Test plan:
1 - Place 1 or more title level holds on a record.
2 - Delete each item individually.
3 - Note that you see the number of holds on the record details page
With this patch, that holds are accessible via the holds tab.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Kyle M Hall (khall) 2016-01-15 18:13:10 UTC Comment hidden (obsolete)
Comment 8 Brendan Gallagher 2016-01-27 01:50:59 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks
Comment 9 Julian Maurice 2016-01-29 11:18:35 UTC
Patch pushed to 3.22.x, will be in 3.22.3
Comment 10 Frédéric Demians 2016-02-12 06:38:18 UTC
This patch has been pushed to 3.20.x, will be in 3.20.9.