Bugzilla – Attachment 17874 Details for
Bug 10169
Software error if one of multiple titles selected for hold in the OPAC has no items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10169 [Incomplete] Software error if one of multiple titles selected for hold in the OPAC has no items
Bug-10169-Incomplete-Software-error-if-one-of-mult.patch (text/plain), 2.23 KB, created by
Owen Leonard
on 2013-05-01 19:50:19 UTC
(
hide
)
Description:
Bug 10169 [Incomplete] Software error if one of multiple titles selected for hold in the OPAC has no items
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-05-01 19:50:19 UTC
Size:
2.23 KB
patch
obsolete
>From b3e3c91486935c37a26b41c3109cb6aeb54beada Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 1 May 2013 15:43:19 -0400 >Subject: [PATCH] Bug 10169 [Incomplete] Software error if one of multiple > titles selected for hold in the OPAC has no items >Content-Type: text/plain; charset="utf-8" > >This patch contains changes suggested by Jared on IRC. This eliminates >the ugly error but raises a new problem: The 'Place hold' screen is now >blank except for a warning: "ERROR: No biblio record found for >biblionumber 5638." > >The warning is triggered by the variable "bad_biblionumber," set here >(opac-reserve.pl lines 362+): > > # Get relevant biblio data. > my $biblioData = $biblioDataHash{$biblioNum}; > if (! $biblioData) { > $template->param(message=>1, bad_biblionumber=>$biblioNum); > &get_out($query, $cookie, $template->output); > } > >I assume this is proper error-handling in the case of placing a single >hold, but has never been revised to accommodate multiple holds? Not sure >where to go next with it. >--- > C4/Items.pm | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index d9c31f9..cc9e66d 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1392,9 +1392,10 @@ sub GetItemsLocationInfo { > sub GetHostItemsInfo { > my ($record) = @_; > my @returnitemsInfo; >- >- if (C4::Context->preference('marcflavour') eq 'MARC21' || >- C4::Context->preference('marcflavour') eq 'NORMARC'){ >+ return unless $record; >+ if ( (C4::Context->preference('marcflavour') eq 'MARC21' || >+ C4::Context->preference('marcflavour') eq 'NORMARC') >+ && $record->field('773') ){ > foreach my $hostfield ( $record->field('773') ) { > my $hostbiblionumber = $hostfield->subfield("0"); > my $linkeditemnumber = $hostfield->subfield("9"); >@@ -1406,7 +1407,7 @@ sub GetHostItemsInfo { > } > } > } >- } elsif ( C4::Context->preference('marcflavour') eq 'UNIMARC'){ >+ } elsif ( C4::Context->preference('marcflavour') eq 'UNIMARC' && $record->field('461') ){ > foreach my $hostfield ( $record->field('461') ) { > my $hostbiblionumber = $hostfield->subfield("0"); > my $linkeditemnumber = $hostfield->subfield("9"); >-- >1.7.9.5
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 10169
: 17874