Bug 28259

Summary: Checking at branch B an item in waiting hold state at branch A kill Koha
Product: Koha Reporter: Didier Gautheron <didier.gautheron>
Component: Hold requestsAssignee: Didier Gautheron <didier.gautheron>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: andrew, anneli.osterman, fridolin.somers, gmcharlt, jonathan.druart, kyle, victor
Version: 21.11   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25969
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 21944    
Bug Blocks:    
Attachments: Bug 28259: (bug 21944 follow-up) if a waiting hold is reverted recheck reserve
Bug 28259: (bug 21944 follow-up) if a waiting hold is reverted recheck reserve

Description Didier Gautheron 2021-04-29 07:51:08 UTC
To Test:

1) Set HoldsAutoFill
2) double check hold rules are on next available item.
3) At midway check out barcode 39999000010831 to 23529000035676 patron ( Henry Acevedo)
4) hold next available to Ronnie Ballard (23529000139858)
5) check in 39999000010831, item is in waiting hold state
6) At Centerville check in 39999000010831 --> internal server error

Regression introduce by Bug 21944 'Improve efficiency of code' patch, item number is lost in reserve table.

Root cause for https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27196 ?
Comment 1 Didier Gautheron 2021-04-29 08:26:32 UTC
Created attachment 120295 [details] [review]
Bug 28259: (bug 21944 follow-up) if a waiting hold is reverted recheck reserve

To test:
1) Set HoldsAutoFill
2) double check hold rules are on next available item.
3) At midway check out barcode 39999000010831 to 23529000035676 patron ( Henry Acevedo)
4) hold next available to Ronnie Ballard (23529000139858)
5) check in 39999000010831, item is in waiting hold state
6) At Centerville check in 39999000010831 --> internal server error
7) Reset database
8) Redo 1) to 5)
9) At Centerville check in 39999000010831, item is in transfert with a hold
Comment 2 Andrew Fuerste-Henry 2021-04-30 19:06:29 UTC
We just tried to fix this in Bug 25969
Comment 3 Andrew Fuerste-Henry 2021-04-30 19:13:06 UTC
But I can confirm this behavior on master. 
"Can't call method "biblionumber" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 1595.
 at /kohadevbox/koha/C4/Reserves.pm line 1594"
Comment 4 Victor Grousset/tuxayo 2021-04-30 20:08:28 UTC
Created attachment 120347 [details] [review]
Bug 28259: (bug 21944 follow-up) if a waiting hold is reverted recheck reserve

To test:
1) Set HoldsAutoFill
2) double check hold rules are on next available item.
3) At midway check out barcode 39999000010831 to 23529000035676 patron ( Henry Acevedo)
4) hold next available to Ronnie Ballard (23529000139858)
5) check in 39999000010831, item is in waiting hold state
6) At Centerville check in 39999000010831 --> internal server error
7) Reset database
8) Redo 1) to 5)
9) At Centerville check in 39999000010831, item is in transfert with a hold

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2021-04-30 20:09:08 UTC
Works :)
Comment 6 Jonathan Druart 2021-05-03 13:10:19 UTC
We need a test for this change.
Comment 7 Anneli Österman 2022-07-13 06:54:14 UTC
We really could need this fix. :)
Comment 8 Katrin Fischer 2022-07-15 09:41:24 UTC
I can no longer reproduce this issue with the test plan in master. Could there have been a fix for this as a side effect of another patch?

Anneli, which version are you seeing the problem with?
Comment 9 Anneli Österman 2022-07-15 09:42:59 UTC
Katrin, we are using version 21.11.
Comment 10 Anneli Österman 2022-07-15 09:56:53 UTC
I tested this now in Bywater's Sandbox and had the same results as Katrin.
Comment 11 Katrin Fischer 2022-07-15 11:16:05 UTC
I am updating the version here to 21.11 for now.
Comment 12 Fridolin Somers 2024-05-29 07:39:46 UTC
Still valid ?