---- Reported by spalding@senylrc.org 2010-02-23 18:07:11 ---- Item Type would be a great feature to be added to the facet list. --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:25 UTC --- This bug was previously known as _bug_ 4255 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4255 Unknown operating system Windows 2000. Setting to default OS "All". Actual time not defined. Setting to 0.0 Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
This is probably one of the more difficult cases! While it is possible to dump multiple MARC fields into a facet, it is NOT possible to look in different subfields across those facets. Since item type is stored at both the item level AND the biblio level, then we need to be able to mix and match both. In MARC21, those fields are 942$c and 952$y. Either we need to remap 942$c to 942$y in MARC21, or we need to modify C4::Search::getRecords in a such a way that it can handle subfields tied to specific fields.
This is for MARC 21 only. Made following changed: - In Getfacets in C4/Koha.pm added item type facet for 952y and 942c - In getrecords in C4:Search.pm added code to get description of itemtype codes - facets.inc in both staff and opac to show item types related label in the facets block To test: Add records such that a certain itype (say BK) is present in both 942c and 952y in two DIFFERENT records. Run a search where both test records are present. Test to see if itype types are presented in the facets block (both OPAC and staff). Click on the itype (say BK), both the test records should appear in the refined results. This shows that the feature works for both 942c and 952y.
Created attachment 9847 [details] [review] Attaching Patch.
Created attachment 10184 [details] [review] [SIGNED-OFF] Bug 4255 - Add item type to facet list This is for MARC 21 only. Made following changed: - In getFacets in C4/Koha.pm added item type facet for 952y and 942c - In getRecords in C4:Search.pm added code to get description of itemtype codes - facets.inc in both staff and opac to show item types related label in the facets block To test: Add records such that a certain itype (say BK) is present in both 942c and 952y in two DIFFERENT records. Run a search where both test records are present. Test to see if itype types are presented in the facets block (both OPAC and staff). Click on the itype (say BK), both the test records should appear in the refined results. This shows that the feature works for both 942c and 952y. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 10296 [details] [review] [PASSED QA] Bug 4255 - Add item type to facet list This is for MARC 21 only. Made following changed: - In getFacets in C4/Koha.pm added item type facet for 952y and 942c - In getRecords in C4:Search.pm added code to get description of itemtype codes - facets.inc in both staff and opac to show item types related label in the facets block To test: Add records such that a certain itype (say BK) is present in both 942c and 952y in two DIFFERENT records. Run a search where both test records are present. Test to see if itype types are presented in the facets block (both OPAC and staff). Click on the itype (say BK), both the test records should appear in the refined results. This shows that the feature works for both 942c and 952y. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Ian Walls <koha.sekjal@gmail.com> QA Comment: fixed capitalization in template includes according to HTML4 coding guideline ("Item types" instead of "ItemTypes")
According to coding guideline HTML4, the string in the templates should be "Item types" not "ItemTypes". Otherwise, this patch is very good, even if it's MARC21-only. I'm so pleased with it, I've made the capitalization fixes myself, and resubmitted with QA signoff.
Patch pushed, a follow-up for UNIMARC would be usefull, will ask claire
There have been no further reports of problems so I am marking this bug resolved.