Bugzilla – Attachment 95806 Details for
Bug 24106
In returns.pl, don't search for item if no barcode is provided
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24106: In returns.pl, don't search for item if no barcode is provided
Bug-24106-In-returnspl-dont-search-for-item-if-no-.patch (text/plain), 2.46 KB, created by
Liz Rea
on 2019-11-25 19:27:40 UTC
(
hide
)
Description:
Bug 24106: In returns.pl, don't search for item if no barcode is provided
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2019-11-25 19:27:40 UTC
Size:
2.46 KB
patch
obsolete
>From b76d472fdddeb85e0de7c9a8ea6ff9953bd596da Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 25 Nov 2019 13:18:16 -0500 >Subject: [PATCH] Bug 24106: In returns.pl, don't search for item if no barcode > is provided > >When loading returns.pl, code to check rotating collections fires off an search for items by barcode, but doesn't check for a barcode first. This means the code will search for items where barcode is NULL, which is definitely not the intended function. > >Test Plan: >1) Apply this patch >2) Set up a rotating collection with items >3) Transfer the collection >4) Check in a rotating collection item >5) Note no change in functionality > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > circ/returns.pl | 28 +++++++++++++++------------- > 1 file changed, 15 insertions(+), 13 deletions(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 5e7d8e24bc..a9e2bc243c 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -634,19 +634,21 @@ $template->param( > AudioAlerts => C4::Context->preference("AudioAlerts"), > ); > >-my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How many times do we fetch this item?!? >-if ( $item_from_barcode ) { >- $itemnumber = $item_from_barcode->itemnumber; >- my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); >- if ( $holdingBranch and $collectionBranch ) { >- $holdingBranch //= ''; >- $collectionBranch //= $returnbranch; >- if ( ! ( $holdingBranch eq $collectionBranch ) ) { >- $template->param( >- collectionItemNeedsTransferred => 1, >- collectionBranch => $collectionBranch, >- itemnumber => $itemnumber, >- ); >+if ( $barcode ) { >+ my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How many times do we fetch this item?!? >+ if ( $item_from_barcode ) { >+ $itemnumber = $item_from_barcode->itemnumber; >+ my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); >+ if ( $holdingBranch and $collectionBranch ) { >+ $holdingBranch //= ''; >+ $collectionBranch //= $returnbranch; >+ if ( ! ( $holdingBranch eq $collectionBranch ) ) { >+ $template->param( >+ collectionItemNeedsTransferred => 1, >+ collectionBranch => $collectionBranch, >+ itemnumber => $itemnumber, >+ ); >+ } > } > } > } >-- >2.11.0
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 24106
:
95805
|
95806
|
95883