Bugzilla – Attachment 87333 Details for
Bug 22611
Typo introduced into Koha::EDI by bug 15685
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22611: Correction for call to get create_item in EDI.pm
Bug-22611-Correction-for-call-to-get-createitem-in.patch (text/plain), 1.96 KB, created by
Katrin Fischer
on 2019-04-02 20:08:42 UTC
(
hide
)
Description:
Bug 22611: Correction for call to get create_item in EDI.pm
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-02 20:08:42 UTC
Size:
1.96 KB
patch
obsolete
>From c76df0847d92aa3333b15dbb3478e93a8c1e492c Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Mon, 1 Apr 2019 12:16:51 +0100 >Subject: [PATCH] Bug 22611: Correction for call to get create_item in EDI.pm > >There was a typo in the addition of a call to >effective_create_items causing processing to abort after adding >a single copy. > >This patch reverts to using the C4::Context call as used for the >first copy created, the intended call to effective_create_items >is a wrapper around that as the field in the basket is guaranteed >to be null (its not set when we call AddBasket). Being consistent >and explicit in what we call should guard against future changes >in dependencies exposing the logic flaw > >Added some comments to make logical flow of code clearer > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > Koha/EDI.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 0e632c9294..4e730de286 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -558,6 +558,8 @@ sub quote_item { > my $schema = Koha::Database->new()->schema(); > my $logger = Log::Log4perl->get_logger(); > >+ # $basketno is the return from AddBasket in the calling routine >+ # So this call should not fail unless that has > my $basket = Koha::Acquisition::Baskets->find( $basketno ); > unless ( $basket ) { > $logger->error('Skipping order creation no valid basketno'); >@@ -810,7 +812,9 @@ sub quote_item { > ); > } > >- if ( $basket->effective_create_item eq 'ordering' ) { >+ # Do not use the basket level value as it is always NULL >+ # See calling subs call to AddBasket >+ if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { > my $new_item = { > notforloan => -1, > cn_sort => q{}, >-- >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 22611
:
87225
|
87271
|
87326
|
87327
| 87333