Bug 7250

Summary: stage_biblios_file.pl is missing options for encodings, wrongly passing the MARC flavour instead
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: MARC Bibliographic record staging/importAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: major    
Priority: PATCH-Sent (DO NOT USE) CC: jcamins, paul.poulain, ulrich.kleiber
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 7250: stage_biblios_file.pl is missing options for encoding
Successfully tested with default encoding utf8.
test records

Description Katrin Fischer 2011-11-21 06:41:38 UTC
The script stage_bilbios_file.pl is passing the MARC flavor instead of the encoding.
Comment 1 Katrin Fischer 2011-11-21 07:04:04 UTC Comment hidden (obsolete)
Comment 2 Ulrich Kleiber 2011-11-22 16:01:18 UTC
Created attachment 6374 [details] [review]
Successfully tested with default encoding utf8.
Comment 3 Ian Walls 2011-11-22 17:01:43 UTC
Fixes an issue with the usage of BatchStageMarcRecords, as well as adds copyright statements, documentation, and cleans up spacing.  Marking as Passed QA.
Comment 4 Paul Poulain 2011-11-24 14:14:05 UTC
I can't reproduce the problem or find a difference with and without the patch. As the patch has been tested & signed-off by the same company, I really want to double check. Katrin/Ulrich = could you attach an example iso2709 file please ?

(note i'm UNIMARC, maybe the problem is MARC21 related)
Comment 5 Katrin Fischer 2011-11-24 14:32:55 UTC
Created attachment 6390 [details]
test records

Without the patch the sub is called with wrong parameters - marcflavour instead of encoding. Without patch the umlauts in the attached marc file should be broken after import.

stage_biblios_file.pl is to be run from command line. Documentation was updated to reflect the change.
Comment 6 Jared Camins-Esakov 2011-11-24 15:12:20 UTC
I can confirm both the bug and the patch, at least for my test data. Good catch, Katrin!
Comment 7 Paul Poulain 2011-11-25 13:29:10 UTC
patch pushed please test

NOTE: just in case you miss the information like I did: it worked through the staff interface, this fix is just for staging records through the command line script (misc/stage_biblios_file.pl)

Test plan:

./stage_biblios_file.pl --encoding ISO_5426 --file ../temp/panier.iso2709 --comment command_line
... staging MARC records -- please wait
... finished staging MARC records

MARC record staging report
------------------------------------
Input file:              ../temp/panier.iso2709
Number of input bibs:    4
Number of valid bibs:    4
Number of invalid bibs:  0
Incoming bibs not matched against existing bibs (--match-bibs option not supplied)
No items parsed (--add-items option not supplied)

=> checked that diacritics were OK on the staff interface, they were