https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43803
--- Comment #2 from Arthur Suzuki <[email protected]> --- Created attachment 207938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207938&action=edit Bug 43803: Do not set a hold waiting on an item checked out in the meantime When confirming a hold at checkin, the "Confirm hold" modal can stay open while the item is checked out again at another workstation (the checkout of a reserved item can be forced without cancelling the hold). Confirming the modal then called ModReserveAffect() unconditionally and set the hold to waiting even though the item was on loan, leaving the item both on loan and on the hold shelf. ModReserveAffect() now returns 0 and leaves the hold unchanged when the item is currently on loan and the hold is not already waiting. This protects all callers (returns.pl, circulation.pl, SIP checkin, hold autofill, branch transfers). circ/returns.pl displays a warning and skips the transfer creation in that case. Test plan: 1) Place an item-level hold on an item checked out to patron A (hold for patron B). 2) Check in the item: the "Hold found" modal appears. Leave it open. 3) From another tab or workstation, check out the item to patron C, confirming the checkout without cancelling the hold. 4) Back on the first tab, click "Confirm hold". => A warning is displayed ("The item has been checked out in the meantime: the hold has not been set aside and remains pending"), the hold is NOT set to waiting, and no transfer is created. 5) Check the item in again and confirm the hold normally. => The hold is set to waiting, the item appears on the hold shelf, and the transfer to the pickup library is created as usual. 6) Run: prove t/db_dependent/Circulation.t -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
