This code looks to have been broken for some time, we check reserves, but we don't pass the variable back to the script
Created attachment 100459 [details] [review] Bug 24839: Return hold info to transfer script and set borrowernumber
Created attachment 100460 [details] [review] Bug 24839: unit tests
Created attachment 100461 [details] [review] Bug 24839: Return hold info to transfer script and set borrowernumber To test: 1 - Place a hold on an item 2 - Go to Circulation->Transfers 3 - Attempt to transfer item to a branch it is not expected at 4 - No warning 5 - Apply patches 6 - Repeate 7 - You get a notice that there is a hold and must deal with the hold (or ignore)
Created attachment 100481 [details] [review] Bug 24839: unit tests Signed-off-by: David Nind <david@davidnind.com>
Created attachment 100482 [details] [review] Bug 24839: Return hold info to transfer script and set borrowernumber To test: 1 - Place a hold on an item 2 - Go to Circulation->Transfers 3 - Attempt to transfer item to a branch it is not expected at 4 - No warning 5 - Apply patches 6 - Repeate 7 - You get a notice that there is a hold and must deal with the hold (or ignore) Signed-off-by: David Nind <david@davidnind.com>
transferbook is also called in rotating collections.. should the return value be used there too?
Created attachment 100542 [details] [review] Bug 24839: unit tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 100543 [details] [review] Bug 24839: Return hold info to transfer script and set borrowernumber To test: 1 - Place a hold on an item 2 - Go to Circulation->Transfers 3 - Attempt to transfer item to a branch it is not expected at 4 - No warning 5 - Apply patches 6 - Repeate 7 - You get a notice that there is a hold and must deal with the hold (or ignore) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(In reply to Martin Renvoize from comment #6) > transferbook is also called in rotating collections.. should the return > value be used there too? I think this can be handled in a follow-up bug report as currently Rotating Collections just ignores the response from transfer book entirely. At some point soon I'd really like to actually see transferbook removed and the Koha Objects alternative used.. but that's down the line.. Passing QA
Created attachment 100544 [details] [review] Bug 24839: (QA follow-up) Remove unused variables Whilst QAing I spotted a couple of unused variables in the test.. no harm in removing them ;) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice work everyone! Pushed to master for 20.05
Backported to 19.11.x for 19.11.05
tests would need to be rebased if this is needed in 19.05.x