Bugzilla – Attachment 75696 Details for
Bug 20829
'Link to host item' gives internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20829: Handle non-existent barcode when linking to host item
Bug-20829-Handle-non-existent-barcode-when-linking.patch (text/plain), 1.53 KB, created by
Marcel de Rooy
on 2018-05-31 07:22:00 UTC
(
hide
)
Description:
Bug 20829: Handle non-existent barcode when linking to host item
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-05-31 07:22:00 UTC
Size:
1.53 KB
patch
obsolete
>From c8fa6bc4018a686f07f43a9690e6ac453920996d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 30 May 2018 12:10:58 -0300 >Subject: [PATCH] Bug 20829: Handle non-existent barcode when linking to host > item >Content-Type: text/plain; charset=utf-8 > >Since commit 2c9aeb9b0f4449d1a25274b8fbf8dae4ec11d3bf > Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem > >$item is not defined if the barcode is invalid, we should not call >method on it in that case. > >Test plan: >- Turn on EasyAnalyticalRecords >- Go to a detail page >- Edit > Link to host item >- Enter an invalid barcode >=> With the patch you get a friendly error message >=> Without this patch it explodes with >Can't call method "itemnumber" on an undefined value at >/home/vagrant/kohaclone/cataloguing/linkitem.pl line 86. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > cataloguing/linkitem.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl >index 40e2a98..4ea4727 100755 >--- a/cataloguing/linkitem.pl >+++ b/cataloguing/linkitem.pl >@@ -75,6 +75,9 @@ if ( $barcode && $biblionumber ) { > errornomodbiblio => 1 > ); > } >+ $template->param( >+ hostitemnumber => $item->itemnumber, >+ ); > } > else { > $template->param( >@@ -85,7 +88,6 @@ if ( $barcode && $biblionumber ) { > > $template->param( > barcode => $barcode, >- hostitemnumber => $item->itemnumber, > ); > > } >-- >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 20829
:
75671
| 75696