Bugzilla – Attachment 163877 Details for
Bug 36422
Triggered holds should not display information about transferring because the item is in a rotating collection.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36422: Only show rotating collection transfer warning if there are no holds on an item
Bug-36422-Only-show-rotating-collection-transfer-w.patch (text/plain), 1.54 KB, created by
Lucas Gass (lukeg)
on 2024-03-25 20:49:31 UTC
(
hide
)
Description:
Bug 36422: Only show rotating collection transfer warning if there are no holds on an item
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-03-25 20:49:31 UTC
Size:
1.54 KB
patch
obsolete
>From 9ad5054caa32162682783c6facf2a287b055c93a Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 25 Mar 2024 20:47:37 +0000 >Subject: [PATCH] Bug 36422: Only show rotating collection transfer warning if > there are no holds on an item > >To Test: >1. Tools > Rotating collections >2. Set up a rotating collection from Branch A and transfer it to Branch B. >3. From Branch A put a hold on that same item for pickup a Branch A. >4. Check the item in to trigger the hold at Branch A. >5. Notice the modal says that the item is on hold and waiting correctly at Branch A. >6. The modal also says "Please transfer item to: Branch 2. This is part of a rotating collection". >7. APPLY PATCH >8. Try steps 3 - 5 again. This time there should be no info. about needing to transfer the item for the rotating collection. >--- > circ/returns.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 5b119e3726..8908870d77 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -837,7 +837,8 @@ $template->param( > > if ( $barcode ) { > my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How many times do we fetch this item?!? >- if ( $item_from_barcode ) { >+ my $hold_count = $item_from_barcode->current_holds->search()->count; >+ if ( $item_from_barcode && !$hold_count ) { > $itemnumber = $item_from_barcode->itemnumber; > my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); > if ( $holdingBranch and $collectionBranch ) { >-- >2.30.2
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 36422
: 163877