Bug 36762 - Item not transferred correctly when there is a pending hold
Summary: Item not transferred correctly when there is a pending hold
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-02 16:36 UTC by Andrew Fuerste-Henry
Modified: 2024-11-07 19:29 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:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2024-05-02 16:36:15 UTC
Koha is doing some dumb stuff when one attempts to transfer an item that could fill a pending hold. To recreate:

1 - be logged in at Branch A
2 - have a bib with 1 holdable item at Branch A
3 - place a hold for pickup at Branch B
4 - confirm hold shows on Holds to Pull and Holds Queue
5 - go to Circulation > Transfers and attempt to send your item to Branch C
6 - Koha gives you three options. Pick the first one: "Transfer to Branch B." This is the hold pickup branch, not the branch you selected for your transfer
7 - Koha tells you it has transferred the item to Branch C (the branch you did select for your transfer)
8 - go to detail.pl for your title, confirm the holdings table says "there is an item level hold" on your item
9 - click to the Holds tab for your title, confirm the hold claims to be in transit
10 - query the branchtransfers table, confirm no transfer was created
11 - query reserves and confirm your hold has found=T, itemnumber=[your item], and item_level_hold=0
12 - Back on the title, attempt to revert transit status, confirm the Revert button doesn't do anything


At step 6, Koha should offer to transfer to the indicated transfer-target, rather than the hold pickup branch. Then it should actually generate the transfer and should not insert the itemnumber into the reserves table or update reserves.found.
Comment 1 Marcel de Rooy 2024-08-14 12:47:11 UTC
Not sure if this is the same problem but some items at our branch A with a hold for pickup at branch B are not transferred when checking them in at A and clicking Confirm hold and transfer.
Note that the hold is updated to a transit hold (found==T) but no transfer is made. Nothing to be found in the logfiles either.

Most items go well. No clue yet which conditions must be met to trigger the issue.
Comment 2 Marcel de Rooy 2024-08-14 12:47:34 UTC
(In reply to Marcel de Rooy from comment #1)
> Not sure if this is the same problem but some items at our branch A with a
> hold for pickup at branch B are not transferred when checking them in at A
> and clicking Confirm hold and transfer.
> Note that the hold is updated to a transit hold (found==T) but no transfer
> is made. Nothing to be found in the logfiles either.
> 
> Most items go well. No clue yet which conditions must be met to trigger the
> issue.

This is in 22.11 btw
Comment 3 Marcel de Rooy 2024-08-14 15:00:15 UTC
Not so sure if I could reproduce my issue on master btw. Master added several actions like cud-checkin and cud-affect-reserve in the CSRF changes, which seem to  impact the flow here?
Comment 4 Marcel de Rooy 2024-08-15 12:46:08 UTC
(In reply to Marcel de Rooy from comment #1)
> Not sure if this is the same problem but some items at our branch A with a
> hold for pickup at branch B are not transferred when checking them in at A
> and clicking Confirm hold and transfer.
> Note that the hold is updated to a transit hold (found==T) but no transfer
> is made. Nothing to be found in the logfiles either.
> 
> Most items go well. No clue yet which conditions must be met to trigger the
> issue.

Found this issue. It is a separate bug on itself. See bug 37650
Comment 5 Anni Rajala 2024-11-07 09:07:10 UTC
This would be nice to get fixed. It is good that the user is alarmed about existing holds, but user should be able to either transfer the item to the indicated transfer-target or decide not to make the transfer at all.