Bug 40792 - Do not fill hold requests when issuing non-holdable items
Summary: Do not fill hold requests when issuing non-holdable items
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: 24.11
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 38650
Blocks:
  Show dependency treegraph
 
Reported: 2025-09-11 10:55 UTC by Andreas Jonsson
Modified: 2025-09-11 14:27 UTC (History)
6 users (show)

See Also:
GIT URL:
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 40792: Do not fill holds with non-reservable items. (3.33 KB, patch)
2025-09-11 14:10 UTC, Andreas Jonsson
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jonsson 2025-09-11 10:55:07 UTC
It is a regression from bug 38650 that issuing non-holdable items now fills holds.

The subroutine C4::Reserves::MoveReserve would previously only do anything if there where a hold that had been filled with the specified item, which mean that the item issued was holdable.

But bug 38650 opened up the possibility to fill the borrowers hold even if the issued item is not holdable.

I suggest a check that the item issued is holdable if the biblio is reserved by the borrower.
Comment 1 Andreas Jonsson 2025-09-11 14:10:22 UTC
Created attachment 186376 [details] [review]
Bug 40792: Do not fill holds with non-reservable items.

Verify that the item issued is reservable before filling the patron's
hold.

1. Go to circulation and fine rules and add a rule for an itemtype
   that can be issued, for instance "Maps" in koha-testing-docker,
   with 0 in the column "Holds per record (count)".
2. Go to any biblio where there are items that may be reserved.
   Create an item with the above created item type and give it a barcode,
   e.g., 'tempbarcode'.
3. Place a hold for any patron (for instance 23529000120056 in
   koha-testing-docker).
4. Issue the item 'tempbarcode' to the patron with the hold.
5. Make sure the hold remains.
6. Create a new hold to another borrower (for instance
   23529000197047), and make sure this new hold has priority 2.
7. Return the item 'tempbarcode' and issue it to the second patron.
8. Make sure both holds remain.
Comment 2 Hans Pålsson 2025-09-11 14:27:08 UTC
Tested in production environment, works as expected. Great work!

Note: this is to enable patrons to have a title level reservation on a title that has multiple item types, one type that is allowed to fill a hold (normal loan) and one type that is not allowed to fill a hold (might be short-time loan etc). Patrons must be able to keep their title level reservation on normal loan item type while they can check out the short-time item type.