Bugzilla – Attachment 15006 Details for
Bug 9516
Item Availability/Data missing from OPAC tag search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9516 - Item Availability/Data missing from OPAC tag search
Bug-9516---Item-AvailabilityData-missing-from-OPAC.patch (text/plain), 1.80 KB, created by
Kyle M Hall
on 2013-02-01 13:47:55 UTC
(
hide
)
Description:
Bug 9516 - Item Availability/Data missing from OPAC tag search
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2013-02-01 13:47:55 UTC
Size:
1.80 KB
patch
obsolete
>From 6dd8a794f7191d6cd5c2aa3403cfde17eee5e369 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 31 Jan 2013 11:20:13 +1100 >Subject: [PATCH] Bug 9516 - Item Availability/Data missing from OPAC tag search > >Currently, an OPAC search using the "tag" and "q" query strings will have results with no item data. Next to "Availability", it will say "No items available:" (N.B. without reference to why the items are unavailable, like Checked out, In transit, etc.). > >The reason is that the opac-search.pl script is just pulling the marc blob straight from the database without embedding any item data. I've used the GetMarcBiblio sub with the embed item data option, and then converted the resulting Marc object to us marc using the "as_usmarc" method. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > opac/opac-search.pl | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 9708176..60e65a5 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -472,8 +472,11 @@ if ($tag) { > $query_cgi = "tag=" .$tag . "&" . $query_cgi; > my $taglist = get_tags({term=>$tag, approved=>1}); > $results_hashref->{biblioserver}->{hits} = scalar (@$taglist); >- my @biblist = (map {GetBiblioData($_->{biblionumber})} @$taglist); >- my @marclist = (map {$_->{marc}} @biblist ); >+ my @marclist; >+ foreach my $record (@$taglist) { >+ my $marc = GetMarcBiblio($record->{biblionumber}, 1); >+ push @marclist, $marc->as_usmarc(); >+ } > $DEBUG and printf STDERR "taglist (%s biblionumber)\nmarclist (%s records)\n", scalar(@$taglist), scalar(@marclist); > $results_hashref->{biblioserver}->{RECORDS} = \@marclist; > # FIXME: tag search and standard search should work together, not exclusively >-- >1.7.2.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 9516
:
14967
| 15006