In search results, one can not place a hold on an item in transit and for loan (items.notforloan=0). This appears when AllowOnShelfHolds is allowed and AllowHoldsOnDamagedItems is not allowed. Depends on Bug 8975 code.
Correction : This appears when AllowOnShelfHolds is allowed and item is not damaged (does not depend on AllowHoldsOnDamagedItems).
Created attachment 20401 [details] [review] Bug 10741 - Can not place a hold on an item in transit and for loan See commit message
Created attachment 20402 [details] [review] Bug 10741 - Formatting can place hold test Follow-up to rewrite the test in a single if test. Removes duplicated test on notforloan that caused this bug.
Created attachment 20549 [details] [review] [SIGNED-OFF] Bug 10741 - Can not place a hold on an item in transit and for loan In search results, one can not place a hold on an item in transit and for loan (items.notforloan=0). This appears when AllowOnShelfHolds is allowed. Depends on Bug 8975 code : a simple if condition is missing when not damaged. Test plan : - Set AllowOnShelfHolds to on - Create a record with a normal item : not lost, not withdrawn, not damaged, notforloan=0 - Index this record - Perform a search on OPAC that returns this record (and others) => You see in actions "Place hold" - Add this item in transit : /cgi-bin/koha/circ/branchtransfers.pl - Re-perform the search on OPAC => You see in actions "Place hold" and item "in transit" Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 20550 [details] [review] [SIGNED-OFF] Bug 10741 - Formatting can place hold test Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 20571 [details] [review] Bug 10741 - Formatting can place hold test Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 20572 [details] [review] Bug 10741 - Can not place a hold on an item in transit and for loan In search results, one can not place a hold on an item in transit and for loan (items.notforloan=0). This appears when AllowOnShelfHolds is allowed. Depends on Bug 8975 code : a simple if condition is missing when not damaged. Test plan : - Set AllowOnShelfHolds to on - Create a record with a normal item : not lost, not withdrawn, not damaged, notforloan=0 - Index this record - Perform a search on OPAC that returns this record (and others) => You see in actions "Place hold" - Add this item in transit : /cgi-bin/koha/circ/branchtransfers.pl - Re-perform the search on OPAC => You see in actions "Place hold" and item "in transit" Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 20573 [details] [review] Bug 10741 - Formatting can place hold test Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Pushed to master, along with a follow-up that adds a regression test. Thanks, Fridolyn!
This patch has been pushed to 3.12.x, will be in 3.12.5. Thanks Fridolyn!
Pushed to 3.10.x, will be in 3.10.11