Bugzilla – Attachment 23216 Details for
Bug 9224
acqui/finishreceive.pl is not Plack-compatible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9224: Make acqui/finishreceive.pl Plack-compatible
Bug-9224-Make-acquifinishreceivepl-Plack-compatibl.patch (text/plain), 2.10 KB, created by
Jonathan Druart
on 2013-11-28 16:01:50 UTC
(
hide
)
Description:
Bug 9224: Make acqui/finishreceive.pl Plack-compatible
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-11-28 16:01:50 UTC
Size:
2.10 KB
patch
obsolete
>From e9a2ed518b6b12f024fa8d44220b8ad3f437e104 Mon Sep 17 00:00:00 2001 >From: Jacek Ablewicz <abl@biblos.pk.edu.pl> >Date: Wed, 16 Oct 2013 17:31:04 +0200 >Subject: [PATCH] Bug 9224: Make acqui/finishreceive.pl Plack-compatible > >Under Plack/mod_perl wrapping, sub update_item() will become a closure, >so after the 1st run it will retain it's own private instances of the >following variables: $booksellerid, $datereceived, $unitprice, $rrp, >$biblionumber. >I.e., in case update_item() gets invoked 2nd+ time (inside >the same process, but for different-subsequent receives) it may >incorrectly flag the (old, wrong) biblionumber for Zebra reindexing, >and erronously modify the current item[s] with the previously >used (wrong) values. > >This simple patch should make acqui/finishreceive.pl Plack-compatible. > >Test plan: >Test patched acqui/finishreceive.pl script (create and receive some >orders w/ items, etc.). Ensure items are gettting added and/or modified >correctly during receiving process. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > acqui/finishreceive.pl | 20 ++++++++------------ > 1 files changed, 8 insertions(+), 12 deletions(-) > >diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl >index 900733d..ea9c9a2 100755 >--- a/acqui/finishreceive.pl >+++ b/acqui/finishreceive.pl >@@ -153,20 +153,16 @@ if ($quantityrec > $origquantityrec ) { > } > } > >-update_item( $_ ) foreach GetItemnumbersFromOrder( $ordernumber ); >- >-print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid"); >- >-################################ End of script ################################ >- >-sub update_item { >- my ( $itemnumber ) = @_; >- >- ModItem( { >+ModItem( >+ { > booksellerid => $booksellerid, > dateaccessioned => $datereceived, > price => $unitprice, > replacementprice => $rrp, > replacementpricedate => $datereceived, >- }, $biblionumber, $itemnumber ); >-} >+ }, >+ $biblionumber, >+ $_ >+) foreach GetItemnumbersFromOrder($ordernumber); >+ >+print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid"); >-- >1.7.2.5
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 9224
:
22020
|
23216
|
23533