Bugzilla – Attachment 68069 Details for
Bug 19431
Error when trying to checkout an unknown barcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19431: Fix error when checking out an unknown barcode
Bug-19431-Fix-error-when-checking-out-an-unknown-b.patch (text/plain), 1.88 KB, created by
Owen Leonard
on 2017-10-13 12:05:12 UTC
(
hide
)
Description:
Bug 19431: Fix error when checking out an unknown barcode
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2017-10-13 12:05:12 UTC
Size:
1.88 KB
patch
obsolete
>From ca80900cea11e486cb0823c43a338b07d42e626c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 9 Oct 2017 19:17:45 -0300 >Subject: [PATCH] Bug 19431: Fix error when checking out an unknown barcode > >It seems this has been caused by > commit 1544f9a5d4a8acd47c97d7c6ac55dee8e759d3ff > Bug 18276: Remove GetBiblioFromItemNumber - circulation pages > >To reproduce the problem you need switch on the two prefs > - OnSiteCheckouts > - OnSiteCheckoutsForce > >Test plan: >Try to check an item out using an unknown barcode >With the 2 prefs set to on and without this patch, you will get the >following error in the log > > Can't call method "materials" on an undefined value at > /home/vagrant/kohaclone/circ/circulation.pl line 387. > >With this patch applied you should not get this error and a correct >behaviour for the different pref combinations. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > circ/circulation.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 130d350..8ca5a78 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -372,7 +372,7 @@ if (@$barcodes) { > } > } > >- unless( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") ) { >+ if ( $error->{UNKNOWN_BARCODE} or not $onsite_checkout or not C4::Context->preference("OnSiteCheckoutsForce") ) { > delete $question->{'DEBT'} if ($debt_confirmed); > foreach my $impossible ( keys %$error ) { > $template_params->{$impossible} = $$error{$impossible}; >@@ -380,7 +380,8 @@ if (@$barcodes) { > $blocker = 1; > } > } >- if( !$blocker || $force_allow_issue ){ >+ >+ if( $item and ( !$blocker or $force_allow_issue ) ){ > my $confirm_required = 0; > unless($issueconfirmed){ > # Get the item title for more information >-- >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 19431
:
67857
|
67863
|
67917
|
67966
|
68069
|
68462