Bugzilla – Attachment 73736 Details for
Bug 20446
QUOTES processing broken by run time error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20446: Fix Edifact quotes processing
Bug-20446-Fix-Edifact-quotes-processing.patch (text/plain), 2.02 KB, created by
Josef Moravec
on 2018-04-06 06:30:08 UTC
(
hide
)
Description:
Bug 20446: Fix Edifact quotes processing
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-04-06 06:30:08 UTC
Size:
2.02 KB
patch
obsolete
>From c2a5ababaaa9cc3e8cd5acca0acc5b6df5c37f93 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 29 Mar 2018 10:39:08 -0300 >Subject: [PATCH] Bug 20446: Fix Edifact quotes processing > >Caused by > commit 04aea91de0f2fe1103e4021f880d135da1fd11a9 > Bug 15685: (QA follow-up) Address QA issues > >->find is called on Koha::Object instead of the set class (Koha::Objects) >and raises the following error: >Can't use string ("Koha::Acquisition::Basket") as a HASH ref while >"strict refs" in use at /usr/share/koha/lib/Koha/Object.pm line 275. > >This patch also makes sure $basketno refers to an existing basket in DB > >I cannot provide a test plan, I have no idea how this code is used. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > Koha/EDI.pm | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index bad68d1..fcf352c 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -36,6 +36,7 @@ use Koha::Edifact; > use Log::Log4perl; > use Text::Unidecode; > use Koha::Plugins::Handler; >+use Koha::Acquisition::Baskets; > use Koha::Acquisition::Booksellers; > > our $VERSION = 1.1; >@@ -545,11 +546,11 @@ sub quote_item { > my ( $item, $quote, $basketno ) = @_; > > my $schema = Koha::Database->new()->schema(); >- >- # create biblio record > my $logger = Log::Log4perl->get_logger(); >- if ( !$basketno ) { >- $logger->error('Skipping order creation no basketno'); >+ >+ my $basket = Koha::Acquisition::Baskets->find( $basketno ); >+ unless ( $basket ) { >+ $logger->error('Skipping order creation no valid basketno'); > return; > } > $logger->trace( 'Checking db for matches with ', $item->item_number_id() ); >@@ -797,8 +798,6 @@ sub quote_item { > ); > } > >- my $basket = Koha::Acquisition::Basket->find( $basketno ); >- > if ( $basket->effective_create_item eq 'ordering' ) { > my $new_item = { > notforloan => -1, >-- >2.1.4
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 20446
:
73090
|
73103
|
73104
|
73156
|
73424
|
73736
|
73756