Bug 11350 - Holds offered to patrons who are not allowed to put the item on hold
Summary: Holds offered to patrons who are not allowed to put the item on hold
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: 21.05
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 14:56 UTC by Peggy Thrasher
Modified: 2021-12-22 21:52 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peggy Thrasher 2013-12-06 14:56:03 UTC
Occurs in 3.10 and current master

If there are two items on a bib record with different item types, then a copy that cannot be put on hold by a particular patron will be offered to that patron when the copy is checked in.

There are two scenarios:
First, if some items can only be put on hold by the home library (set in the Holds policy by item type at the bottom of the circ rules), then if a patron from a different branch puts on a bib level hold it and the restricted copy is checked in, it is offered through the popup to the patron from the different branch.
Second, if some patron types are allowed to put holds on an item type and others are not, then when the restricted copy is checked in it is offered to the patron who is not allowed to put a hold on it.

It's a little clearer in the test plan...

Scenario One

Create branches
East
West

Create item types
Book
Restricted

Set Circ rules (Holds policy by item type at the bottom)
Add All-All-All rule for all libraries
(Set AllowOnShelfHolds in System Preferences/Circulation/Holds to Allow)
For East branch for Restricted item type: From home library
for West branch for Restricted item type: From home library

Create patrons
East Patron  (branch: East, patron type: Normal)
West Patron  (Branch: West, patron type: Normal)
AnotherEast Patron (branch: East, patron type: Normal)

Add a bib record (Koha Item Type Book) with two items
item1 (homebranch: East, item type: Book)
item2 (homebranch: East, item type: Restricted)

Verify that item2 can be put on item specific hold (but don't actually put it on hold) for East Patron
Verify that item2 cannot be put on item specific hold for West Patron

Log into Staff client at EastBranch
Check out item1 to East Patron
Check out item2 to AnotherEast Patron
Put a bib level hold on the title for West Patron
Check in item2
Incorrect behavior:  a popup offering the hold to West patron
Correct behavior:  No popup, item2 can go back on the shelf

Scenario Two

Create one branch
East

Create item types
Book
Restricted

Create patron types
Normal
Special

Set Circ rules for East branch
Add All-All-All rule for all libraries
(Set AllowOnShelfHolds in System Preferences/Circulation/Holds to Allow)
Book:  All patron types can put 5 holds
Restricted:  Normal patron type can put 0 holds
          Special Patron Type can put 5 holds
          

Create patrons
East Patron  (branch: East, patron type: Special)
AnotherEast Patron (branch: East, patron type: Normal)
ThirdEast Patron (branch: East, patron type: Normal)

Add a bib record with two items
item1 (homebranch: East, item type: Book)
item2 (homebranch: East, item type: Restricted)

Verify that item2 can be put on item specific hold (but don't actually put it on hold) for East Patron
Verify that item2 cannot be put on item specific hold for AnotherEast Patron

Log into Staff client at East branch
Check out item1 to East Patron
Check out item2 to AnotherEast Patron
Put a bib level hold on the title for ThirdEast Patron
Check in item2
Incorrect behavior:  a popup offering the hold to ThirdEast patron
Correct behavior:  No popup, item2 can go back on the shelf


Koha figures out properly if an item can be put on hold, we need to use that same logic during checkin when determining who to offer the hold to.
Comment 1 Marc Véron 2015-12-20 17:33:39 UTC
Still valid?
Comment 2 Lisette Scheer 2016-10-29 00:55:32 UTC
I've had this happen on occasion in the current stable, but I have updated a circulation rule and haven't seen it since. 
It could still be an issue as it only came up a few times.
Comment 3 Lisette Scheer 2021-04-09 00:03:28 UTC
This does appear to still be valid. We are on 20.05.09

It also shows up on the hold list if there is a copy that can be placed on hold for a patron but the only currently on-shelf copy can't be placed on hold for the patron. 

Lisette
Comment 4 Sara Brown 2021-11-11 00:34:44 UTC
I'm seeing this on 21.05.04. 

Settings:
-ReservesControlBranch set to 'item's home library'
-Patron X created in category LIMITED with home library EAST
-Circ rules at library EAST allow category LIMITED patrons to place holds on item type ADULTBOOK
-Circ rules at library WEST prevent category LIMITED patrons from placing holds on item type BOOK
-Bib 999 has items with itype ADULTBOOK (all home library EAST) and BOOK (all home library WEST)

Steps:
-Make ADULTBOOK copy of bib 999 unavailable via checkout to unrelated patron (etc.)
-Place bib-level hold on bib 999 for patron X - WEST-owned BOOK copy shows correctly as unavailable for item-level hold in 'Place a hold on a specific item' section

Then both:
-The WEST-owned BOOK copy of bib 999 appears on WEST's next holds queue run for patron X, and also 
-Checking in the BOOK copy of bib 999 triggers the hold for patron X
Comment 5 Alex Buckley 2021-12-21 04:34:19 UTC
I think this bug report might be a duplicate of bug 23172