Bug 10741

Summary: Can not place a hold on an item in transit and for loan
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: SearchingAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: bgkriegel, gmcharlt, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 8975    
Bug Blocks:    
Attachments: Bug 10741 - Can not place a hold on an item in transit and for loan
Bug 10741 - Formatting can place hold test
[SIGNED-OFF] Bug 10741 - Can not place a hold on an item in transit and for loan
[SIGNED-OFF] Bug 10741 - Formatting can place hold test
Bug 10741 - Formatting can place hold test
Bug 10741 - Can not place a hold on an item in transit and for loan
Bug 10741 - Formatting can place hold test

Description Fridolin Somers 2013-08-16 11:35:53 UTC
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.
Comment 1 Fridolin Somers 2013-08-16 11:38:31 UTC
Correction : 
This appears when AllowOnShelfHolds is allowed and item is not damaged (does not depend on AllowHoldsOnDamagedItems).
Comment 2 Fridolin Somers 2013-08-16 11:53:54 UTC Comment hidden (obsolete)
Comment 3 Fridolin Somers 2013-08-16 11:55:26 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2013-08-22 13:17:21 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2013-08-22 13:17:32 UTC Comment hidden (obsolete)
Comment 6 Chris Cormack 2013-08-23 03:17:17 UTC Comment hidden (obsolete)
Comment 7 Chris Cormack 2013-08-23 03:17:38 UTC
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>
Comment 8 Chris Cormack 2013-08-23 03:17:54 UTC
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>
Comment 9 Galen Charlton 2013-08-23 15:59:11 UTC
Pushed to master, along with a follow-up that adds a regression test.  Thanks, Fridolyn!
Comment 10 Tomás Cohen Arazi 2013-09-13 16:44:53 UTC
This patch has been pushed to 3.12.x, will be in 3.12.5.

Thanks Fridolyn!
Comment 11 Bernardo Gonzalez Kriegel 2013-09-15 01:47:47 UTC
Pushed to 3.10.x, will be in 3.10.11