Bug 9213 - Implement analytics for NORMARC XSLT
authorMagnus Enger <magnus@enger.priv.no>
Thu, 24 Jan 2013 22:17:45 +0000 (23:17 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 20 Mar 2013 18:40:47 +0000 (14:40 -0400)
commit3f7dd2730a7b02721606ee0262706719157f062b
tree89bd5d0e8551b2ab6d0476163974928443217667
parent3d35521c0b39274a923e9e0a0a21219d6aa6348f
Bug 9213 - Implement analytics for NORMARC XSLT

Problem:
Links between anaytics records were not being displayed for NORMARC setups.

What this patch does:
1. Add indexing for 773 subfield a, w and 9; both for GRS-1 and DOM indexing
   (The DOM indexing config was generated from the GRS-1 record.abs)
2. Add "analytics links" to NORMARC XSLT files, both for OPAC and intranet

To test:
- Make sure you have a NORMARC installation
- Set UseControlNumber = Use
- Create a parent record with LDR/07=c. Leave 001 empty.
- In the "Normal" view, do New > New child record and create another record. Do
  this twice (so you get a list of hits when you click on the "Show anaytics"
  links later on).

- Do the following steps both in the OPAC and the Intranet:
  - Search for the parent record in such a way that you can see the record in a
    *result list*
  - Check that the "Show analytics" link is displayed, and uses the title of the
    parent record for linking: ?q=Host-item:<Title of parent record>
  - Clik on the "Show analytics" link and check that you get a result list with
    the two child records you created earlier
  - Go back to the result list and click on the parent record, so you get the
    *detail view*
  - Check that the "Show analytics" link is displayed, and uses the title of the
    parent record for linking: ?q=Host-item:<Title of parent record>
  - Clik on the "Show analytics" link and check that you get a result list with
    the two child records you created earlier
  - Search for one or both of the child records in such a way that you can see
    the record(s) in a *result list*
  - Check that the "In: <Title of parent record>" link is displayed, and that it
    uses the biblionumber of the parent record for linking:
    ?q=Control-number:<biblionumber of parent record>
  - Click on the "In: <Title of parent record>" link, and check that the parent
    record is displayed
  - Go back to the result list and click on the child record, so you get the
    *detail view*
  - Check that the "In: <Title of parent record>" link is displayed, and that it
    uses the biblionumber of the parent record for linking:
    ?q=Control-number:<biblionumber of parent record>
  - Click on the "In: <Title of parent record>" link, and check that the parent
    record is displayed

- Now edit the parent record and put it's biblionumber in 001. Repeat the steps
  above, and check that everything still works, but that the links are different:
  - The "Show analytics" link on the parent record should look like this:
    ?q=rcn:<biblionumber of parent record>+and+(bib-level:a+or+bib-level:b)
  - The "In: <Title of parent record>" link on the child records should be the
    same as it was earlier

- Now set UseControlNumber = "Don't use" and repeat all of the steps above
  - All of the links should still be displayed and work, of course
  - The "In: <Title of parent record>" link on the child records should look
    like this: ?q=ti,phr:<Title of parent record>
  - The "Show analytics" link on the parent record should look like this:
    ?q=Host-item:<Title of parent record>

- Change LDR/07 to "s" and repeat all of the steps above
- Do all of this both for GRS-1 indexing and for DOM indexing...

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xml
etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl
etc/zebradb/marc_defs/normarc/biblios/record.abs
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetResults.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl