Bug 19978: Fix ITEMTYPECAT behaviour
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 16 Jan 2018 13:25:00 +0000 (10:25 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sun, 18 Feb 2018 17:47:57 +0000 (14:47 -0300)
commit69e51d729ff7e5e1a90a0d6ce13e2ca6a0c69308
tree80c6e78204ca0fe895e0209ebc77f287cee9d78a
parent208f1021255f388418135ea0aac4e4e4258d0525
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.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
opac/opac-search.pl