Bugzilla – Attachment 129083 Details for
Bug 29808
Stock rotation fails to advance when an item is checked out from the branch that is the next stage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29808: Do not receive transfer for checked out items
Bug-29808-Do-not-receive-transfer-for-checked-out-.patch (text/plain), 1.89 KB, created by
Martin Renvoize (ashimema)
on 2022-01-06 13:42:57 UTC
(
hide
)
Description:
Bug 29808: Do not receive transfer for checked out items
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-01-06 13:42:57 UTC
Size:
1.89 KB
patch
obsolete
>From b3b7001aff7ae75740010d4cb7538bf66a268c96 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 6 Jan 2022 12:38:05 +0000 >Subject: [PATCH] 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> >--- > Koha/StockRotationItem.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/StockRotationItem.pm b/Koha/StockRotationItem.pm >index 58f0a6c25b..7be42c722f 100644 >--- a/Koha/StockRotationItem.pm >+++ b/Koha/StockRotationItem.pm >@@ -272,7 +272,9 @@ sub advance { > } > }; > $transfer->receive >- if $item->holdingbranch eq $new_stage->branchcode_id; # Already at branch >+ if $item->holdingbranch eq $new_stage->branchcode_id && !$item->checkout; >+ # If item is already at branch, and not checked out >+ # If item is checked out, the return will either receive or initiate the transfer > > return $transfer; > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29808
:
129061
|
129062
|
129082
| 129083