We should have a `request_transfer` method available within the Koha::Item object.
Created attachment 105887 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff TODO: Complete work of LIFO queues for get_transfer and add tests for that
Created attachment 107240 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff
Created attachment 107294 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff
Created attachment 110273 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Tested in use by Kathleen as part of relying on bug 22569
I am a little confused by this one. The POD documents a force parameter, but it doesn't appear to be implemented (see FIXME). And there is also another FIXME about adding tests. Can you please check?
Created attachment 110376 [details] [review] Bug 25755: (QA follow-up) Clarify POD and parameters This patch removes a FIXME that signified possible future work and also updates the POD and optional parameters to more clearly specify their function. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(In reply to Katrin Fischer from comment #6) > I am a little confused by this one. The POD documents a force parameter, but > it doesn't appear to be implemented (see FIXME). And there is also another > FIXME about adding tests. Can you please check? Fair questions; The FIXME was left behind during various rebases and signified possible future work to be done. I have removed it in the followup and left myself a local note instead. As for the force parameter, it was in-fact implemented but only for the 'transfer limits' case and not the 'transfer in progress' case. I've renamed the parameter to clarify it's use in the followup. This is really just foundational work.. I've tried hard to think of future use cases, but I have a feeling I'll be making minor adjustments to this method as I start replacing uses of C4::Circulation::transferbook and C4::Items::ModItemTransfer with calls to this new method.
Created attachment 110392 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110393 [details] [review] Bug 25755: (QA follow-up) Clarify POD and parameters This patch removes a FIXME that signified possible future work and also updates the POD and optional parameters to more clearly specify their function. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 110394 [details] [review] Bug 25755: Add Unit tests for update get_transfer We updated Koha::Item->get_transfer here to account for the new daterequested field availability. It is now possible to set requested without setting datesent simultaneiously.. as such we need to update get_transfer to ensure we always return the right transfer (either the one 'in transit' or the oldest request first. This patch update the unit tests to test for this.
Created attachment 110430 [details] [review] Bug 25755: Fix typo in POD
I am sorry, but now tests are failing: # Failed test 'request_transfer' # at t/db_dependent/Koha/Item.t line 403. [Transfer not allowed]# Looks like your test exited with 255 just after 5. t/db_dependent/Koha/Item.t ... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 4/8 subtests t/db_dependent/Koha/Items.t .. ok Test Summary Report ------------------- t/db_dependent/Koha/Item.t (Wstat: 65280 Tests: 5 Failed: 1) Failed test: 5 Non-zero exit status: 255 Parse errors: Bad plan. You planned 8 tests but ran 5. Files=2, Tests=17, 17 wallclock secs ( 0.05 usr 0.02 sys + 12.27 cusr 2.00 csys = 14.34 CPU) Result: FAIL
Created attachment 110466 [details] [review] Bug 25755: (follow-up) Fix unit test
Oops.. I just forgot to update the unit tests for the change in parameter name (ignore_limits vs force)
Created attachment 110502 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 110503 [details] [review] Bug 25755: (QA follow-up) Clarify POD and parameters This patch removes a FIXME that signified possible future work and also updates the POD and optional parameters to more clearly specify their function. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 110504 [details] [review] Bug 25755: Add Unit tests for update get_transfer We updated Koha::Item->get_transfer here to account for the new daterequested field availability. It is now possible to set requested without setting datesent simultaneiously.. as such we need to update get_transfer to ensure we always return the right transfer (either the one 'in transit' or the oldest request first. This patch update the unit tests to test for this. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 110505 [details] [review] Bug 25755: Fix typo in POD Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 110506 [details] [review] Bug 25755: (follow-up) Fix unit test Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111142 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111143 [details] [review] Bug 25755: (QA follow-up) Clarify POD and parameters This patch removes a FIXME that signified possible future work and also updates the POD and optional parameters to more clearly specify their function. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111144 [details] [review] Bug 25755: Add Unit tests for update get_transfer We updated Koha::Item->get_transfer here to account for the new daterequested field availability. It is now possible to set requested without setting datesent simultaneiously.. as such we need to update get_transfer to ensure we always return the right transfer (either the one 'in transit' or the oldest request first. This patch update the unit tests to test for this. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111145 [details] [review] Bug 25755: Fix typo in POD Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 111146 [details] [review] Bug 25755: (follow-up) Fix unit test Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
According to the graph this would be the next step in the transfers tree, but the patches appear to have been removed. Last I see is a move from PQA to Blocked in the history, but no comment. I'd be happy to continue working on the transfers patches in small steps, but not confident enough to do them all together I think. There are some other patches in the QA queue further down - I am going to move them to BLOCKED for now as well.
Created attachment 116541 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116542 [details] [review] Bug 25755: (QA follow-up) Clarify POD and parameters This patch removes a FIXME that signified possible future work and also updates the POD and optional parameters to more clearly specify their function. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116543 [details] [review] Bug 25755: Add Unit tests for update to get_transfer We updated Koha::Item->get_transfer here to account for the new daterequested field availability. It is now possible to set requested without setting datesent simultaneiously.. as such we need to update get_transfer to ensure we always return the right transfer (either the one 'in transit' or the oldest request first. This patch update the unit tests to test for this. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116544 [details] [review] Bug 25755: Fix typo in POD Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116545 [details] [review] Bug 25755: (follow-up) Fix unit test Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116546 [details] [review] Bug 25755: (QA follow-up) Further POD clarifications This patch attempts to further clarify the queueing nature of transfer requests in the get_transfer method POD. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117574 [details] [review] Bug 25755: Add Koha::Item->request_transfer method This patch adds the request_transfer method to the Koha::Item object. The new method requires `to` and `reason` parameters and will throw an exception if an active transfer request is found on the item. Test plan 1/ Run the included updated tests in t/db_dependent/Koha/Item.t 2/ Verify the tests pass 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117575 [details] [review] Bug 25755: (QA follow-up) Clarify POD and parameters This patch removes a FIXME that signified possible future work and also updates the POD and optional parameters to more clearly specify their function. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117576 [details] [review] Bug 25755: Add Unit tests for update to get_transfer We updated Koha::Item->get_transfer here to account for the new daterequested field availability. It is now possible to set requested without setting datesent simultaneiously.. as such we need to update get_transfer to ensure we always return the right transfer (either the one 'in transit' or the oldest request first. This patch update the unit tests to test for this. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117577 [details] [review] Bug 25755: Fix typo in POD Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117578 [details] [review] Bug 25755: (follow-up) Fix unit test Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117579 [details] [review] Bug 25755: (QA follow-up) Further POD clarifications This patch attempts to further clarify the queueing nature of transfer requests in the get_transfer method POD. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Pushed to master for 21.05, thanks to everybody involved!
Enhancement not pushed to 20.11.x