Bug 15062

Summary: Holds queue with Transport Cost Matrix will transfer item even if transfers disabled
Product: Koha Reporter: Kyle M Hall <kyle.m.hall>
Component: Hold requestsAssignee: Kyle M Hall <kyle.m.hall>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, josef.moravec, kyle, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 15062 - Holds queue with Transport Cost Matrix will transfer item even if transfers disabled
Bug 15062 - Holds queue with Transport Cost Matrix will transfer item even if transfers disabled
Bug 15062 [QA Followup] - Unit Test
Bug 15062 - Holds queue with Transport Cost Matrix will transfer item even if transfers disabled
Bug 15062 [QA Followup] - Unit Test
Bug 15062 - Holds queue with Transport Cost Matrix will transfer item even if transfers disabled
Bug 15062 [QA Followup] - Unit Test
[PASSED QA] Bug 15062 - Holds queue with Transport Cost Matrix will transfer item even if transfers disabled

Description Kyle M Hall 2015-10-26 12:30:43 UTC
If the transfer of an item from Library A to Library B is disabled in the Transport Cost Matrix, but the only item on a record is from Library A, the holds queue will request a transfer of that item from Library A to Library B even though the rules state such a transfer is not allowed!
Comment 1 Kyle M Hall (khall) 2015-10-26 12:35:02 UTC Comment hidden (obsolete)
Comment 2 Andreas Hedström Mace 2015-10-30 14:33:43 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-11-18 22:51:21 UTC
Hi Kyle, can you please add a regression test for this scenario?
Comment 4 Kyle M Hall (khall) 2015-11-19 12:45:32 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall (khall) 2015-11-19 12:45:39 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall (khall) 2015-11-19 12:55:05 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall (khall) 2015-11-19 12:55:12 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2015-11-20 13:49:12 UTC
Created attachment 45041 [details] [review]
Bug 15062 [QA Followup] - Unit Test
Comment 9 Katrin Fischer 2015-11-20 13:49:26 UTC
Created attachment 45042 [details] [review]
[PASSED QA] Bug 15062 - Holds queue with Transport Cost Matrix will transfer item even if transfers disabled

If the transfer of an item from Library A to Library B is disabled in
the Transport Cost Matrix, but the only item on a record is from Library
A, the holds queue will request a transfer of that item from Library A
to Library B even though the rules state such a transfer is not allowed!

Test Plan:
1) Enable the transport cost matrix
2) For simplicity, leave all cells disabled on it, save this state.
   This state means that only items at each location should fill
   holds where the pickup library is that same location.
3) Create a record with one item, set its home and holding branch
   to Library A
4) Create a hold for pickup at Library B
5) Rebuild the holds queue
6) Note the transfer request for the item to Library B
7) Apply this patch
8) Rebuild the holds queue
9) Note the transfer request is gone

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Tomás Cohen Arazi (tcohen) 2015-11-23 14:45:17 UTC
Patches pushed to master.

Thanks Kyle!