]> git.koha-community.org Git - koha.git/commit
Bug 29808: Do not receive transfer for checked out items
authorNick Clemens <nick@bywatersolutions.com>
Thu, 6 Jan 2022 12:38:05 +0000 (12:38 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Fri, 11 Feb 2022 12:33:06 +0000 (12:33 +0000)
commit910be2636cd3a7da3f916c4ac7f20c1c17bd6cc5
tree4be4d29a5ee1e67c387b85506d14ce85d9338730
parent528e7624eee74a424a298325cbeaa0dc6c54d9fc
Bug 29808: Do not receive transfer for checked out items

This patch adds a check to StockRotationItem->advance to check if an
item is checked out from the destination branch. If so, we do not receive the transfer

To test:
 1 - Enable StockRotation system preference
 2 - Browse to Tools->Stock rotation->New Rota and create a new rota, set as cyclical
 3 - Manage->stages and add two stages, each with 0 day duration
 4 - Manage->items - add an item
 5 - Checkout the item from the first branch of rotation
 6 - Tools->Stock rotation->Manage->items->move to next stage
 7 - Error:
    [Transfer item is currently checked out] at /usr/share/perl5/Exception/Class/Base.pm line 88
 8 - Check in the item at first branch
 9 - Checkout the item from the second stage branch
10 - Apply patch
11 - Tools->Stock rotation->Manage->items->move to next stage
12 - No error!
13 - Check in item at second branch
14 - Checkout from first branch
15 - Tools->Stock rotation->Manage->items->move to next stage
16 - Still no error!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 92a15ba56d21bf01cc0b65620465f86fe522e3d5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Koha/StockRotationItem.pm