Bug 23092 adds a daterequested field to the branchtransfers table which better reflects how stockrotation utilises the existing datesent field. This patchset will update stockrotation to take advantage of the new field and in doing so rectify some of the rotation logic.
Created attachment 105943 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockration triggered branchtransfers and moves the datesent value into daterequested
Created attachment 105944 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches.
Created attachment 105945 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff
Created attachment 107246 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested
Created attachment 107247 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches.
Created attachment 107248 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff
Created attachment 107249 [details] [review] Bug 24446: Add Koha::Item::Transfer->in_transit method This method returns a boolean representing the in_transit state of the transfer.
Created attachment 107250 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user.
Created attachment 107252 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested
Created attachment 107253 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches.
Created attachment 107254 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff
Created attachment 107255 [details] [review] Bug 24446: Add Koha::Item::Transfer->in_transit method This method returns a boolean representing the in_transit state of the transfer.
Created attachment 107256 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user.
Created attachment 107301 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested
Created attachment 107302 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches.
Created attachment 107303 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff
Created attachment 107304 [details] [review] Bug 24446: Add Koha::Item::Transfer->in_transit method This method returns a boolean representing the in_transit state of the transfer.
Created attachment 107305 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user.
Created attachment 110280 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110281 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110282 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110283 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Tested in use by Kathleen as part of relying on bug 22569
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/StockRotationItems.t t/db_dependent/StockRotationItems.t .. 5/8 # Looks like you planned 6 tests but ran 5. # Failed test 'Tests for needs_advancing.' # at t/db_dependent/StockRotationItems.t line 229. Can't locate object method "clone" via package "0" (perhaps you forgot to load "0"?) at /usr/lib/x86_64-linux-gnu/perl5/5.24/DateTime/Duration.pm line 326. # Looks like your test exited with 255 just after 6. t/db_dependent/StockRotationItems.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 3/8 subtests Test Summary Report ------------------- t/db_dependent/StockRotationItems.t (Wstat: 65280 Tests: 6 Failed: 1) Failed test: 6 Non-zero exit status: 255 Parse errors: Bad plan. You planned 8 tests but ran 6. Files=1, Tests=6, 3 wallclock secs ( 0.02 usr 0.01 sys + 2.64 cusr 0.25 csys = 2.92 CPU) Result: FAIL
Oops, I forgot to mark this as assigned.. I found a couple fo bugs whilst sorting out some of the tree last week.. working on them at the moment.. thanks for testing Katrin.
Created attachment 110533 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 110534 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110535 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110536 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110537 [details] [review] Bug 24446: (follow-up) Handle cases of pre-existing transfers This is a long standing bug in stockrotation (and transfers in general) where by if a transfer is in progress and another transfer is requested then the original transfer is inexplicitly cancelled. This patch updates the stockrotation code to handle queued transfers, either adding a StockrotationAdvance transfer to the queue when an in progress transfer was triggered to fulfil a Reserve, or otherwise cancelling the transfer as stockrotation should take precidence.
Leaving as FQA.. just thought of some more tests I aught to add with that final followup :|
Created attachment 110538 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 110539 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110540 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110541 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Created attachment 110542 [details] [review] Bug 24446: (follow-up) Handle cases of pre-existing transfers This is a long standing bug in stockrotation (and transfers in general) where by if a transfer is in progress and another transfer is requested then the original transfer is inexplicitly cancelled. This patch updates the stockrotation code to handle queued transfers, either adding a StockrotationAdvance transfer to the queue when an in progress transfer was triggered to fulfil a Reserve, or otherwise cancelling the transfer as stockrotation should take precidence.
The dependent bug 26057 still requires sign-off - moving to BLOCKED for the moment.
Created attachment 111322 [details] [review] Bug 24446: Prioritize RotatingCollection transfer over StockRotationAdvance This patch prioritizes the RotatingCollection transfer type over the StockRotationAdvance transfers allowing us to queue up a our transfer behind it.
Created attachment 116557 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested 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 116558 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116559 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116560 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116561 [details] [review] Bug 24446: Update transferbook Unit Test We updated C4::Circulation::transferbook to return the to_branch branchcode as the data entity for 'WasTransfered'. This patch updates the corresponding unit test. To test: 1/ Run t/db_dependent/Circulation/transferbook.t 2/ Signoff if it passes Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116562 [details] [review] Bug 24446: Update GetTransfers Unit Test We updated the return signature for GetTransfers and as such need to update the corresponding unit test Test plan 1/ Run t/db_dependent/Circulation/transfers.t 2/ Confirm it passes 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116563 [details] [review] Bug 24446: (follow-up) Handle cases of pre-existing transfers This is a long standing bug in stockrotation (and transfers in general) where by if a transfer is in progress and another transfer is requested then the original transfer is inexplicitly cancelled. This patch updates the stockrotation code to handle queued transfers, either adding a StockrotationAdvance transfer to the queue when an in progress transfer was triggered to fulfil a Reserve, or otherwise cancelling the transfer as stockrotation should take precidence. To test 1/ Run t/db_dependent/StockRotationsItems.t. 2/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116564 [details] [review] Bug 24446: Prioritize RotatingCollection transfer over StockRotationAdvance This patch prioritizes the RotatingCollection transfer type over the StockRotationAdvance transfers allowing us to queue up a our transfer behind it. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116565 [details] [review] Bug 24446: Add datecancelled handling to GetTransfers Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116566 [details] [review] Bug 24446: Add datesent/datecancelled handling to GetTransfersFromTo With the first uses of Koha::Item->request_transfer and Koha::Item::Transfer->cancel having been added, we need to update GetTransferFromTo to respect transfers that have been requested but not yet sent and not cancelled. Test plan 1/ Run the included unit test 2/ Confirm the "Transfers to recieve" page loads 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116567 [details] [review] Bug 24446: Update ModItemTransfer for daterequested/datecancelled C4::Items::ModItemTransfer is used throughout the codebase and currently it will never set the daterequested or datecancelled fields. With the modifications to how circulation deals with transfers we need to update this function to set those fields appropriately. Functionality has been retained, ModItemTransfer will continue to add a transfer regardless of limits or current transits existing. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116568 [details] [review] Bug 24446: (QA follow-up) Update transferbook Test Needed for a rebase, a new test was introduced so we need to add the trigger option into that test now too. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 116569 [details] [review] Bug 24446: (QA follow-up) Fix ModItemTransfer tests Seems I missed passing trigger in the tests for ModItemTransfer. This patch corrects that oversight. 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 116570 [details] [review] Bug 24446: (QA follow-up) Correction to datecancelled for ModItemTransfer ModItemTransfer always replaces any existing transfers, including those in transit.. so we needed to add a 'force' option to Koha::Item::Transfer->cancel(); Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117589 [details] [review] Bug 24446: Update branchtransfers.daterequested for stockrotation This database update catches existing stockrotation triggered branchtransfers and moves the datesent value into daterequested 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 117590 [details] [review] Bug 24446: Improve StockRotationItem->advance tests This patch adds additional checks in the tests for item homebranch updates and cyclical transfers caused by the StockRotationItem->advance method. It highlights a bug in the original logic whereby a cyclical rotation would always result in a completed transfer but the physical item would not have actually been moved between branches. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117591 [details] [review] Bug 24446: Update StockRotationItem to use daterequested This patch updates the stockrotation functionality to utilise the new branchtransfers.daterequested field to more accurately track the state of stockrotation transfers. We also opt to start using the new Koha::Item and Koha::Item::Transfer methods to achieve this goal. Test plan 0/ Setup stockrotation and configure some rotas and assign items to them. 1/ Run the stockrotation cronscript 2/ Check the database for branchtransfers initiated by stockrotation and confirm that that now populate the daterequested field and not the datesent. 3/ Run the stockrotation tests and verify they pass 4/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117592 [details] [review] Bug 24446: Catch daterequested in circ returns Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to find requested transfers and use Koha::Item::Transfer->receipt to complete transfer requests if they have arrived at their destination or return the relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages to the end user. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117593 [details] [review] Bug 24446: Update transferbook Unit Test We updated C4::Circulation::transferbook to return the to_branch branchcode as the data entity for 'WasTransfered'. This patch updates the corresponding unit test. To test: 1/ Run t/db_dependent/Circulation/transferbook.t 2/ Signoff if it passes Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117594 [details] [review] Bug 24446: Update GetTransfers Unit Test We updated the return signature for GetTransfers and as such need to update the corresponding unit test Test plan 1/ Run t/db_dependent/Circulation/transfers.t 2/ Confirm it passes 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117595 [details] [review] Bug 24446: (follow-up) Handle cases of pre-existing transfers This is a long standing bug in stockrotation (and transfers in general) where by if a transfer is in progress and another transfer is requested then the original transfer is inexplicitly cancelled. This patch updates the stockrotation code to handle queued transfers, either adding a StockrotationAdvance transfer to the queue when an in progress transfer was triggered to fulfil a Reserve, or otherwise cancelling the transfer as stockrotation should take precidence. To test 1/ Run t/db_dependent/StockRotationsItems.t. 2/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117596 [details] [review] Bug 24446: Prioritize RotatingCollection transfer over StockRotationAdvance This patch prioritizes the RotatingCollection transfer type over the StockRotationAdvance transfers allowing us to queue up a our transfer behind it. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117597 [details] [review] Bug 24446: Add datecancelled handling to GetTransfers Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117598 [details] [review] Bug 24446: Add datesent/datecancelled handling to GetTransfersFromTo With the first uses of Koha::Item->request_transfer and Koha::Item::Transfer->cancel having been added, we need to update GetTransferFromTo to respect transfers that have been requested but not yet sent and not cancelled. Test plan 1/ Run the included unit test 2/ Confirm the "Transfers to recieve" page loads 3/ Signoff Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117599 [details] [review] Bug 24446: Update ModItemTransfer for daterequested/datecancelled C4::Items::ModItemTransfer is used throughout the codebase and currently it will never set the daterequested or datecancelled fields. With the modifications to how circulation deals with transfers we need to update this function to set those fields appropriately. Functionality has been retained, ModItemTransfer will continue to add a transfer regardless of limits or current transits existing. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117600 [details] [review] Bug 24446: (QA follow-up) Update unit test for ModItemTransfer Update unit test to reflect we now use cancellationdate and cancellation_reason in ModItemTransfer
Created attachment 117601 [details] [review] Bug 24446: (QA follow-up) Update transferbook Test Needed for a rebase, a new test was introduced so we need to add the trigger option into that test now too. Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117602 [details] [review] Bug 24446: (QA follow-up) Fix ModItemTransfer tests Seems I missed passing trigger in the tests for ModItemTransfer. This patch corrects that oversight. 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 117603 [details] [review] Bug 24446: (QA follow-up) Correction to datecancelled for ModItemTransfer ModItemTransfer always replaces any existing transfers, including those in transit.. so we needed to add a 'force' option to Koha::Item::Transfer->cancel(); Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Created attachment 117604 [details] [review] Bug 24446: (QA follow-up) Set TransferTrigger to 'Reserve' for bug 24298 The SIP initiated transfer was set to use the 'TransferTrigger' passed back from AddReturn; However, TransferTrigger is not set for reserves in AddReturn (It's is set controller side by circ/returns.pl). We thus need to also hard code the trigger type in the SIP transaction for reserves.
Created attachment 117605 [details] [review] Bug 24446: (QA follow-up) SIP test fix for bug 27166 A new test was introduced in bug 27166 since this code was written, this patch simply updates the test for the additional 'TransferTrigger' message that is returned by this patchset.
Created attachment 117606 [details] [review] Bug 24446: (QA follow-up) Remove superflous store calls The original code here called store after setting each field. Instead, we set all the fields and call store at the end and save ourselves a few database hits.
Created attachment 117607 [details] [review] Bug 24446: (QA follow-up) Use 'receive' method in ModReserveAffect ModeReserveAffect was setting all transfers in the queue to received by looping through a resultset. This patch updates the logic to try and catch the in_transit transfer and receive just that one instead.
Pushed to master for 21.05, thanks to everybody involved!
Enhancement not pushed to 20.11.x
Created attachment 120116 [details] [review] Bug 24446: (follow-up) Fix tests The tests were failing because we weren't actually changing the item, so store was doing nothing. We need to transfer 'from' a new branch so that the holdingbranch is changed
Follow-up pushed to master.