Bugzilla – Attachment 14967 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
0001-Bug-9516-Item-Availability-Data-missing-from-OPAC-ta.patch (text/plain), 2.14 KB, created by
David Cook
on 2013-01-31 00:29:27 UTC
(
hide
)
Description:
Bug 9516 - Item Availability/Data missing from OPAC tag search
Filename:
MIME Type:
Creator:
David Cook
Created:
2013-01-31 00:29:27 UTC
Size:
2.14 KB
patch
obsolete
>From 00249f3c621e0a19fa86e0b1bb8d9694b7996ceb 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. > >--- > >To test: >(Before patch) >1) Click on Tag cloud >2) Click on any of the tags >3) Note that all results say "Availability: No items available:" >4) Click on any result and note the actual status of the items for that biblio record > >(Apply patch) >1) Click on Tag cloud >2) Click on any of the tags >3) Note that the results actually have the correct item availability next to the "Availability" label. >--- > 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.7.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 9516
:
14967
|
15006