Bugzilla – Attachment 70551 Details for
Bug 19978
Fix ITEMTYPECAT feature for grouping item types for search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19978: Fix ITEMTYPECAT behaviour
Bug-19978-Fix-ITEMTYPECAT-behaviour.patch (text/plain), 1.78 KB, created by
Jonathan Druart
on 2018-01-16 13:33:01 UTC
(
hide
)
Description:
Bug 19978: Fix ITEMTYPECAT behaviour
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-01-16 13:33:01 UTC
Size:
1.78 KB
patch
obsolete
>From dbd927867ab1f2dd6cdd9be80307a7ebe68a8b21 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 Jan 2018 10:25:00 -0300 >Subject: [PATCH] Bug 19978: Fix ITEMTYPECAT behaviour > >ITEMTYPECAT permits to group and hide item types at the OPAC (see bug >10937 for a complete description). > >Since commit 091d6c513bcbee224ff06477e79be48cea7fe825 > Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes >the code assume that they are item types. Before it just assigned undef >to the description. > >Test plan: >Create ITEMTYPECAT authorised values >Assign an item type to this authorised value group >Search for a item using this item type at the OPAC >Without this patch applied you get: >Can't call method "translated_description" on an undefined value at >/home/vagrant/kohaclone/opac/opac-search.pl line 231. > >With this patch applied the search result is displayed. > >Make sure the original feature still works. >--- > opac/opac-search.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index ccde617022..fbeb241650 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -225,6 +225,7 @@ $template->param(search_languages_loop => $languages_limit_loop,); > my $itemtypes = GetItemTypesCategorized; > # add translated_description to itemtypes > foreach my $itemtype ( keys %{$itemtypes} ) { >+ next if $itemtypes->{$itemtype}->{iscat}; > # Itemtypes search categories don't have (yet) translated descriptions, they are auth values (and could still have no descriptions too BZ 18400) > my $translated_description = Koha::ItemTypes->find( $itemtype )->translated_description; > $itemtypes->{$itemtype}->{translated_description} = $translated_description || $itemtypes->{$itemtype}->{description} || q{}; >-- >2.11.0
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 19978
:
70551
|
71471
|
71539
|
71901