Bug 12554 - C4::Biblio GetMarcPrice does not handle NORMARC
Summary: C4::Biblio GetMarcPrice does not handle NORMARC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 12672
Blocks: 12674
  Show dependency treegraph
 
Reported: 2014-07-11 08:49 UTC by Petter Goksøyr Åsen
Modified: 2015-06-04 23:33 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
When doing aquisitions and ordering from external z3950 targes, the item price is not inferred from the MARC record when the NORMARC framework is set. (1.37 KB, patch)
2014-07-11 08:55 UTC, Petter Goksøyr Åsen
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 12554: Fix GetMarcPrice for NORMARC (1.65 KB, patch)
2014-07-26 21:52 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 12554: Fix GetMarcPrice for NORMARC (1.80 KB, patch)
2014-07-27 22:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC (2.14 KB, patch)
2014-07-29 18:54 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Petter Goksøyr Åsen 2014-07-11 08:49:12 UTC
When doing aquisitions and ordering from external z3950 targes, the item price is not inferred from the MARC record when the NORMARC framework is set.

The fix is easy, because the price is stored in the same field in NORMARC as in MARC21.
Comment 1 Petter Goksøyr Åsen 2014-07-11 08:55:32 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2014-07-26 21:52:44 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-07-27 22:42:43 UTC
Created attachment 30170 [details] [review]
[PASSED QA] Bug 12554: Fix GetMarcPrice for NORMARC

When doing aquisitions and ordering from external z3950 targes, the item price is not inferred from the MARC record when the NORMARC framework is set.

This patch makes GetMarcPrice treat NORMARC the same as MARC21.

Test plan

* Setup Koha with NORMARC framework
* Add a norwegian z3950 search target (ex: z3950.bibsys.no:2100, database=BIBSYS)
* Create a new basket, and add order to basket from external source
* Search for a tile (ex: ISBN 8205341834) from the bibsys z3950 server
* Click to order the title
* Observe that vendor price is not set
* Apply patch, repeat search for same book
* Order, and observe the vendor price is filled in from the MARC record

http://bugs.koha-community.org/show_bug.cgi?id=12554
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described. No errors.

Tested changing marcflavour syspref to NORMARC,
and following test plan, bug exist and is fixed.

Changed bug description on patch, too long :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch adds a check for NORMARC to provide the same functionality
as for MARC21. No regressions found.
Comment 4 Tomás Cohen Arazi 2014-07-29 18:54:26 UTC
Created attachment 30302 [details] [review]
Bug 12554: (regression test) C4::Biblio::GetMarcPrice does not handle NORMARC
Comment 5 Tomás Cohen Arazi 2014-07-29 18:57:45 UTC
I'm sorry I blocked this, but writing the regression tests lead to another bug, which is solved at bug 12672. Unit tests couldn't be written without that patch  because they would make the GetMarcISBN tests fail (adding subfield $c to 020 or its UNIMARC counterpart).
Comment 6 Tomás Cohen Arazi 2014-08-03 15:32:17 UTC
Patch pushed to master.

Thanks Petter!