Bugzilla – Attachment 67239 Details for
Bug 19350
Holds without link in 773 trigger SQL::Abstract::puke
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19350 - Holds without link in 773 trigger SQL::Abstract::puke
Bug-19350---Holds-without-link-in-773-trigger-SQLA.patch (text/plain), 1.30 KB, created by
Dobrica Pavlinusic
on 2017-09-20 15:30:55 UTC
(
hide
)
Description:
Bug 19350 - Holds without link in 773 trigger SQL::Abstract::puke
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2017-09-20 15:30:55 UTC
Size:
1.30 KB
patch
obsolete
>From 6e44c6f78698ceba1c96921ed337def20dd8b7ec Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Wed, 20 Sep 2017 16:01:16 +0200 >Subject: [PATCH] Bug 19350 - Holds without link in 773 trigger > SQL::Abstract::puke > >Test: >1. find bibio without items which has something in field 773 > (for us, it's article) but doesn't have 0 or 9 (host item entry) >2. click on hold in left menu >3. verify application error >4. apply patch and verify that it works >--- > C4/Items.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 0b6a77e..b64aa60 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1341,7 +1341,12 @@ sub get_hostitemnumbers_of { > > foreach my $hostfield ( $marcrecord->field($tag) ) { > my $hostbiblionumber = $hostfield->subfield($biblio_s); >+ next unless $hostbiblionumber; # have tag, don't have $biblio_s subfield > my $linkeditemnumber = $hostfield->subfield($item_s); >+ if ( ! $linkeditemnumber ) { >+ warn "ERROR biblionumber $biblionumber has 773^0, but doesn't have 9"; >+ next; >+ } > my $is_from_biblio = Koha::Items->search({ itemnumber => $linkeditemnumber, biblionumber => $hostbiblionumber }); > push @returnhostitemnumbers, $linkeditemnumber > if $is_from_biblio; >-- >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 19350
:
67239
|
67311
|
67562