]> git.koha-community.org Git - koha.git/commit
Bug 12362: (QA follow-up) Fix ModItemTransfer cancellation handling
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 20 Apr 2021 09:28:40 +0000 (10:28 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Apr 2021 09:58:49 +0000 (11:58 +0200)
commitfbba09f63f200d3e57a8612554984d807867cf84
treea15257e0f4687e0ca9cee354a1a485ac69a4f225
parent6c105829144cd341a4bc65ad8d0ee1f996b423d4
Bug 12362: (QA follow-up) Fix ModItemTransfer cancellation handling

ModItemTransfer is still used, sparingly. It force cancels transfers
regardles of whether they are already marked as in_transit. We do not,
however, want to enqueue a return transfer in this case as
ModItemTransfer is itself an enqueue function.  This patch updates the
internal logic of ModItemTransfer to enqueue the passed transfer prior
to cancelling the pre-existing one.. in this way the result is one
cancelled transfer and one new transfer and not three transfers.

Test plan
1/ Run t/db_dependant/Items.t and verify it fails prior to applying this
patch
2/ Apply patch and run the test again, verifying it now passes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Item.pm