Koha/misc
Marcel de Rooy d24568b672 Bug 19049: Fix regression on stage-marc-import with to_marc plugin
Bug 12412 added the use of to_marc plugins allowing arbitrary file formats
in stage-marc-import (as long as the plugins can handle them). The feature
was not very visible in the code, and when bug 10407 added the marcxml
format, it made some changes that broke the use of to_marc.

This patch restores the functionality by:
[1] Adding a sub RecordsFromMarcPlugin to ImportBatch.pm, specifically
    addressing the conversion from arbitrary formats to MARC::Record.
    The original to_marc interface is used: pass it the file contents,
    and it returns a string consisting of a number of MARC blobs separated
    by \x1D.
    Consequently, the call of to_marc is removed from routine
    BatchStageMarcRecords where it did not belong. The to_marc_plugin
    parameter is removed and two calls are adjusted accordingly.
[2] Instead of a separate combo with plugins, the format combo contains
    MARC, MARCXML and optionally some plugin formats.
[3] The code in stage-marc-import.pl now clearly shows the three main
    format types: MARC, MARCXML or plugin based.

Note: This patch restores more or less the situation after bug 12412, but
I would actually recommend to have the to_marc plugins return MARC::Record
objects instead of large text strings. In the second example I added a
to_marc plugin that actually converts MARC record objects to string format,
while RecordsFromMarcPlugin reconverts them to MARC::Records.

Test plan:
See second patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-08-15 12:17:41 -03:00
..
admin
bin
cronjobs Bug 17829: Move GetMember to Koha::Patron 2017-07-10 13:14:19 -03:00
devel Bug 17567: Make populate_db.pl initialize ES mappings 2016-11-12 02:39:35 +00:00
interface_customization Bug 17639 - Remove white filling inside of Koha logo 2017-07-13 18:31:37 -03:00
load_testing Bug 17829: Move GetMember to Koha::Patron 2017-07-10 13:14:19 -03:00
maintenance Bug 18058: Allow borrower_message_preferences to be truncated 2017-03-31 10:07:03 +00:00
migration_tools Bug 18262: Koha::Biblio - Remove GetBiblioData - part 1 2017-07-14 12:22:23 -03:00
plack Bug 16520: Allow per-VirtualHost environment variables with Plack 2016-10-11 12:49:42 +00:00
release_notes Add release notes for Koha 17.05 2017-05-30 03:14:40 +00:00
search_tools Bug 17372: Standardize Elasticsearch paths 2016-10-11 01:07:03 +00:00
translator Bug 18901: [QA Follow-up] Do not translate zzpref either 2017-07-14 12:30:00 -03:00
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl Bug 9988: Remove further references to dontmerge 2017-04-13 08:53:47 -04:00
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl
export_borrowers.pl Bug 17829: Move GetMember to Koha::Patron 2017-07-10 13:14:19 -03:00
export_records.pl Bug 15498: Let the user choose the CSV profile to export circ history 2017-03-31 11:13:47 +00:00
exportauth.pl
koha-install-log
kohalib.pl
link_bibs_to_authorities.pl
mod_zebraqueue.pl
perlmodule_ls.pl
perlmodule_rm.pl
recreateIssueStatistics.pl
sax_parser_print.pl Bug 17626 (QA followup) 2016-11-22 11:29:07 +00:00
sax_parser_test.pl
sip_cli_emulator.pl Bug 16757 - Add support for Fee Paid to SIP cli emulator for testing 2017-03-31 13:56:37 +00:00
stage_file.pl Bug 19049: Fix regression on stage-marc-import with to_marc plugin 2017-08-15 12:17:41 -03:00