Bugzilla – Attachment 44455 Details for
Bug 15098
Itemtype description missing from facets for itypes in a search group
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 15098: Itemtype description missing from facets for itypes in a search group
PASSED-QA-Bug-15098-Itemtype-description-missing-f.patch (text/plain), 2.46 KB, created by
Katrin Fischer
on 2015-11-05 07:03:41 UTC
(
hide
)
Description:
[PASSED QA] Bug 15098: Itemtype description missing from facets for itypes in a search group
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-11-05 07:03:41 UTC
Size:
2.46 KB
patch
obsolete
>From e8abc88ea242e7092383ecfc1ad1ad27d26e144c Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Wed, 4 Nov 2015 09:24:10 -0300 >Subject: [PATCH] [PASSED QA] Bug 15098: Itemtype description missing from > facets for itypes in a search group >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds a second variable to hold item types info >just for facets. > >In case we have an item type in a search category, it's description >is removed from GetItemTypesCategorized, which is good for advanced >search, but no for facets > >A second var is needed which holds all item type info. > >To test: >On top of Bug 15092 patches (no really needed, but I write this on top >of them) >1) Add an item type to a search group >2) Do a search in opac, in facets will see only item type code, >no description, for that item type >3) Apply the patch >4) Repeat search, now description must be present > >Followed test plan including translated descriptions. Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > opac/opac-search.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 1780b55..8437931 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -215,6 +215,8 @@ my $itemtypes = GetItemTypesCategorized; > foreach my $itemtype ( keys %{$itemtypes} ) { > $itemtypes->{$itemtype}->{translated_description} = getitemtypeinfo( $itemtype, 'opac' )->{translated_description}; > } >+# Load the Type stuff without search categories for facets >+my $itemtypes_nocategory = GetItemTypes; > # the index parameter is different for item-level itemtypes > my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; > my @advancedsearchesloop; >@@ -596,7 +598,7 @@ if ($tag) { > $pasarParams .= '&simple_query=' . uri_escape_utf8($simple_query); > $pasarParams .= '&query_type=' . uri_escape_utf8($query_type) if ($query_type); > eval { >- ($error, $results_hashref, $facets) = getRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes,$query_type,$scan,1); >+ ($error, $results_hashref, $facets) = getRecords($query,$simple_query,\@sort_by,\@servers,$results_per_page,$offset,$expanded_facet,$branches,$itemtypes_nocategory,$query_type,$scan,1); > }; > } > # This sorts the facets into alphabetical order >-- >1.9.1
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 15098
:
44364
|
44368
| 44455