When singlebranchmode is actived users can't place holds. Looks a lot like #3164 which was supposed to be resolved. Simple patch to follow.
Created attachment 7811 [details] [review] Singlebranchmode was always 0 causing the branch to be null and the reservations in the OPAC not to work in singlebranchmode.
Marking as a bug and and a note that this is sponsored by our client CCSR (http://ccsr.qc.ca).
I was not able to reproduce the bug on the BibLibre sandboxes 4 and 8. This is what I did: 1. Switched "SingleBranchMode" to "Allow". 2. Went to the Opac side and placed a hold on an item. The status "Pending" was displayed. 3. Switched to the staff client and went to the holds for the book and saw the hold. No error message. Did I miss a step?
Hm, perhaps there is a difference between item level holds and title level holds - but only guessing here. Did you try both?
I tried both just now on master: 1. Make sure that singlebranch mode is allowed. 2. Make sure that I can place holds. 3. Find a book for which I can place a hold on the OPAC side. 4. Place a hold and choose "Next available copy". 5. I can place the hold. 6. Find another book for which I can place a hold, click the "Place Hold" link. 7. Choose "A specific copy" and can place the hold. 8. Do the same as 4 and 7 but choosing a different branch (the one that is not the default).
Sorry, here are more details. You can see in the code : if ($singleBranchMode || ! $OPACChooseBranch) { # single branch mode or disabled user choosing Without my patch, singleBranchMode is always 0, so if OPACAllowUserToChooseBranch is 0, then no branch is ever set and the code doesn't work. So to reproduce set OPACAllowUserToChooseBranch to "Don't allow". The bug is present when users can't choose the branch and the code use the borrowers's defautl branch.
Without patch With singlebranchmode = Allow And OPACAllowUserToChooseBranch = Don't allow Can still place holds in the opac With singblebranchmode= Don't Allow and OPACAllowUserToChooseBranch = Don't allow, Can still place holds With singlebranch = Don't Allow and OPACAllowUserToChooseBranch = Allow, Can not place holds (silent fail)
Created attachment 8324 [details] [review] signed-off patch I used Chris' test scenarios as basis for my testing because eventually we had a silent fail. Sorry that I didn't see some things earlier, but code is pretty much a mystery to me. ;-)
QA comment: tiny patch !
This bug will be included in the Koha 3.6.5 release.