Bug 7537

Summary: Implement TraceCompleteSubfields, TraceSubjectSubdivisions and UseICU for NORMARC XSLT
Product: Koha Reporter: Magnus Enger <magnus>
Component: MARC Bibliographic data supportAssignee: Magnus Enger <magnus>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: normal    
Priority: P5 - low CC: jcamins, katrin.fischer, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7092, 7552, 7695    
Bug Blocks:    
Attachments: Bug 7537 - Implement TraceCompleteSubfields and TraceSubjectSubdivisions for NORMARC XSLT
Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and TracingQuotes for NORMARC XSLT
Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and TracingQuotes for NORMARC XSLT
Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and UseICU for NORMARC XSLT
[SIGNED-OFF] Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and UseICU for NORMARC XSLT

Description Magnus Enger 2012-02-14 09:17:11 UTC
Clicking on subjects does not work as expected when XSLT is on and marcflavour = NORMARC. Looks like missing implementations of TraceCompleteSubfields and TraceSubjectSubdivisions are the culprits...
Comment 1 Magnus Enger 2012-02-16 11:08:10 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2012-02-16 21:50:58 UTC
Oops... Looks like my patch works with MARC21-indexing, but not with NORMARC... New patch coming after I figure out why!
Comment 3 Magnus Enger 2012-03-09 13:03:34 UTC Comment hidden (obsolete)
Comment 4 Magnus Enger 2012-03-09 13:07:45 UTC
The problem with my first patch was that I needed a fix for Bug 7092 - "Complete-subfield searches TraceCompleteSubfields syspref not working correctly" first (specifically, the TracingQuotes syspref). Hence, this patch must be applied on top of the one for that bug.
Comment 5 Jared Camins-Esakov 2012-03-10 15:35:17 UTC Comment hidden (obsolete)
Comment 6 Magnus Enger 2012-03-16 12:47:46 UTC
I'll do a new patch to reflect the changes to Bug 7092 (renaming of the TracingQuotes syspref).
Comment 7 Magnus Enger 2012-03-16 13:29:43 UTC
Comment on attachment 8141 [details] [review]
Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and TracingQuotes for NORMARC XSLT

Needs an update after the changes to Bug 7092 (syspref TracingQuotes renamed to UseICU). I'll do a new patch for this after 7092 gets through QA.
Comment 8 Magnus Enger 2012-03-23 12:59:52 UTC Comment hidden (obsolete)
Comment 9 Magnus Enger 2012-03-23 13:00:29 UTC
Updated patch: 

- Change the syspref TracingQuotes to UseICU, see bug 7092
- Change boolean operator from "and" to "AND", see bug 7695
Comment 10 Katrin Fischer 2012-03-27 18:36:21 UTC
Created attachment 8654 [details] [review]
[SIGNED-OFF] Bug 7537 - Implement TraceCompleteSubfields, TraceSubjectSubdivisions and UseICU for NORMARC XSLT

IMPORTANT! This patch relies on the patch for Bug 7092, which is now pushed to
master.

As the title says, this patch implements TraceCompleteSubfields,
TraceSubjectSubdivisions and UseICU for NORMARC XSLT, both for the OPAC
and the Intranet. This affects how clickable subject-links are constructed.

To make this work the indexing of MARC fields in the 600 range is changed
to include "Subject:p" in several new places.

To test:

Find a record with a "complex" subject, like "Internet -- Law and legislation".
MARC21 and NORMARC are very similar in how they handle subjects, so testing
on a MARC21 database should be OK. (Changes in indexing reflect changes already
made to the MARC21 indexing.)

Make sure you have these syspref settings:
- marcflavour = NORMARC
- XSLTDetailsDisplay = using XSLT stylesheets
- OPACXSLTDetailsDisplay = using XSLT stylesheets

(Ideally, testing should be done on a real NORMARC setup, but since the changes
to indexing only reflect how it's already done in MARC21, I think testing
on a MARC21 installation with marcflavour = NORMARC should be OK.)

Now try the different combinations of TraceCompleteSubfields,
TraceSubjectSubdivisions and UseICU, and check the format of the
clickable links, both in the OPAC and staff client. Here's what you should
be seeing:

1.
TraceCompleteSubfields   = Don't force
TraceSubjectSubdivisions = Don't include
UseICU = Not using
  opac-search.pl?q=su:"Internet"
UseICU = Using
  opac-search.pl?q=su:{Internet}

2.
TraceCompleteSubfields   = Force
TraceSubjectSubdivisions = Don't include
UseICU = Not using
  opac-search.pl?q=su,complete-subfield:"Internet"
UseICU = Using
  opac-search.pl?q=su,complete-subfield:{Internet}

3.
TraceCompleteSubfields   = Don't force
TraceSubjectSubdivisions = Include
UseICU = Not using
  opac-search.pl?q=(su:"Internet") AND (su:"Law and legislation.")
UseICU = Using
  opac-search.pl?q=(su:{Internet}) AND (su:{Law and legislation.})

4.
TraceCompleteSubfields   = Force
TraceSubjectSubdivisions = Include
UseICU = Not using
  opac-search.pl?q=(su,complete-subfield:"Internet") AND (su,complete-subfield:"Law and legislation.")
UseICU = Using
  opac-search.pl?q=(su,complete-subfield:{Internet}) AND (su,complete-subfield:{Law and legislation.})

UPDATE 2012-03-23
- Change the syspref TracingQuotes to UseICU, see bug 7092
- Change boolean operator from "and" to "AND", see bug 7695

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Note: UseControlnumber must be turned off.

1) Works.
2) Works.
3) Works.
4) Works.
Comment 11 Ian Walls 2012-03-28 18:33:15 UTC
Changes NORMARC XSLT and record.abs only.  Record.abs changes are to add new subject:p indexes, and XSLT changes are safe and clean (correctly uses the standard 'delimeter', even though it's a typo).  Marking as Passed QA.
Comment 12 Paul Poulain 2012-03-29 09:01:08 UTC
patch pushed, but not tested myself, trusting Magnus to fix quickly any problem ;-)
Comment 13 Magnus Enger 2012-04-27 14:29:15 UTC
Works in 3.8.