Bug 10058 - Fix unapi for NORMARC
Summary: Fix unapi for NORMARC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Z39.50 / SRU / OpenSearch Servers (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Magnus Enger
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-15 19:54 UTC by Magnus Enger
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10058 - Fix unapi for NORMARC (2.11 KB, patch)
2013-04-15 20:06 UTC, Magnus Enger
Details | Diff | Splinter Review
Sample NORMARC record (925 bytes, application/octet-stream)
2013-04-15 20:14 UTC, Magnus Enger
Details
Bug 10058 - Fix unapi for NORMARC (2.16 KB, patch)
2013-04-16 10:31 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 10058 - Fix unapi for NORMARC (2.22 KB, patch)
2013-04-19 14:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2013-04-15 19:54:50 UTC
Currently, if you have marcflavour = NORMARC and visit /cgi-bin/koha/unapi, all you get is an empty <formats></formats> element. Patch coming in a sec!
Comment 1 Magnus Enger 2013-04-15 20:06:46 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2013-04-15 20:14:09 UTC
Created attachment 17477 [details]
Sample NORMARC record
Comment 3 Chris Cormack 2013-04-16 10:31:14 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-04-19 14:03:11 UTC
QA comment:
Looks good according to test plan.
Marked as Passed QA.
Comment 5 Jonathan Druart 2013-04-19 14:03:33 UTC
Created attachment 17552 [details] [review]
Bug 10058 - Fix unapi for NORMARC

This patch uses a lot of MARC21 XSLT to transform NORMARC records
to desired formats. Since NORMARC is mostly a subset of MARC21, I
think this should give passable results. And better results than
no unapi-support at all for NORMARC!

To reproduce:
- Make sure you have marcflavour = NORMARC
- Visit /cgi-bin/koha/unapi in a browser
- Observe the empty <formats></formats> element

To test:
- Apply the patch
- Visit /cgi-bin/koha/unapi in a browser
- Observe the the list of formats in the <formats></formats> element
- Import the provided sample NORMARC record and make a note of its
  biblionumber
- View the record at /cgi-bin/koha/unapi?id=koha:biblionumber:x&format=y
  where x = the biblionumber of the sample record and y = one of the
  formats marcxml, marcxml-full, mods, mods-full, mods3, mods3-full,
  oai_dc, rdfdc, rss2, rss2-full and srw_dc
- Check that the transformed records make some kind of superficial
  sense

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jared Camins-Esakov 2013-04-20 02:58:16 UTC
This patch has been pushed to master and 3.12.x.
Comment 7 Chris Cormack 2013-04-27 05:29:58 UTC
Pushed to 3.10.x will be in 3.10.6