[Bug 15098] New: Itemtype description missing from facets for itypes hidden in OPAC
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Bug ID: 15098 Summary: Itemtype description missing from facets for itypes hidden in OPAC Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org If the itemtype is marked as hidden in OPAC, only the itype code is shown in the facets. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #1 from Marc Véron <veron@veron.ch> --- Hi Katrin, I do not know how to reproduce the issue. What I did: - Mark a item type as hidden in Opac - This item type no longer appears in Opac on advanced search, as advertised near "Hide in Opac": "(if checked, items of this type will be hidden as filters in OPAC's advanced search)" - Go to Opac. Do a search. - Item Types appear at teh left in facets. They all have their names ( Books, E-Book ...) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- For me the problem is not when hideinopac is set, but when the item type is assigned to a search group (talking about Item types in facets) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Itemtype description |Itemtype description |missing from facets for |missing from facets for |itypes hidden in OPAC |itypes in a search group --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think Bernardo is right - I had testd those 2 new features and probably named the wrong cause. Changing bug title - thx for testing! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 --- Comment #4 from Marc Véron <veron@veron.ch> --- Following findings: opac/opac-search.pl line 213 calls GetItemTypesCategorized and then resolves the codes to the descriptions But C4/Koha.pm, GetItemTypesCategorized, line 303 has: SELECT itemtype, description, imageurl, hideinopac, 0 as 'iscat' FROM itemtypes WHERE ISNULL(searchcategory) or length(searchcategory) = 0 (...) If I remove the WHERE clause, the label appears in the facet as expected (Books isntead of BK in my test case). I think this is the place for some more digging. Where is GetItemTypesCategorized used, is it possible to remove the where clause without side effects (No, I'm afraid), do we need a variant without where clause for the facets? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Marc Véron from comment #4)
If I remove the WHERE clause, the label appears in the facet as expected (Books isntead of BK in my test case).
I think this is the place for some more digging. Where is GetItemTypesCategorized used, is it possible to remove the where clause without side effects (No, I'm afraid), do we need a variant without where clause for the facets?
I'm afraid not.GetItemTypesCategorized is used to get item types and search groups. But as you said, we need to dig a little more :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 44364 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44364&action=edit Bug 15098: Itemtype description missing from facets for itypes in a search group 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |bgkriegel@gmail.com Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff Depends on| |15092 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15092 [Bug 15092] item type descriptions not showing if no logo -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44364|0 |1 is obsolete| | --- Comment #7 from Marc Véron <veron@veron.ch> --- Created attachment 44368 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44368&action=edit Bug 15098: Itemtype description missing from facets for itypes in a search group 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44368|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 44455 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44455&action=edit [PASSED QA] Bug 15098: Itemtype description missing from facets for itypes in a search group 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15098 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Bernardo! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org