Summary: | Add item type to facet list | ||
---|---|---|---|
Product: | Koha | Reporter: | Zachary Spalding <spalding> |
Component: | OPAC | Assignee: | Meenakshi <meenakshi.r> |
Status: | CLOSED FIXED | QA Contact: | Bugs List <koha-bugs> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | claire.hernandez, koha.sekjal, kyle.m.hall, paul.poulain, savitra.sirohi |
Version: | 3.10 | ||
Hardware: | PC | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 3216 | ||
Bug Blocks: | |||
Attachments: |
Attaching Patch.
[SIGNED-OFF] Bug 4255 - Add item type to facet list [PASSED QA] Bug 4255 - Add item type to facet list |
Description
Chris Cormack
2010-05-21 01:25:00 UTC
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. |