[koha-commits] main Koha release repository branch 17.05.x updated. v17.05.03-23-gf067450

Git repo owner gitmaster at git.koha-community.org
Wed Sep 6 15:35:01 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 17.05.x has been updated
       via  f067450d8011fb0a27a28524bec359ffad4f2278 (commit)
       via  5699df9deed09edbaa3db1087f3e453c28ac1091 (commit)
       via  3bbb89c57181c113d64ec7649195de30b52d0806 (commit)
       via  c6e3f2ac0575849a0b48170506a4986a50ac8bf1 (commit)
       via  4dd020a3019cd7e2b357153ec737b15eea95f671 (commit)
      from  8f3a7d800271cb2611de0cb369e907b16c30fb0b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f067450d8011fb0a27a28524bec359ffad4f2278
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Fri Aug 11 08:34:45 2017 +0200

    Bug 19049: [QA Follow-up] Mock config, default format
    
    As requested by QA:
    [1] Mock_config enable_plugins in the test.
    [2] Fallback to MARC when format is empty. Remove die statement.
    Added:
    [3] Remove $marc. This variable got obsolete during development.
    [4] Add test on $input_file and $plugin_class. Test $text before calling
        Handler or processing $text. No need to split undef if somehow Handler
        returned undef, etc. If the routine returns an empty arrayref,
        stage-marc-import will do fine.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit a423fcff42da05e9ebf9f2b4a2f192023346e93e)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 5699df9deed09edbaa3db1087f3e453c28ac1091
Author: Kyle M Hall <kyle at bywatersolutions.com>
Date:   Thu Aug 10 09:02:37 2017 -0400

    Bug 19049 [QA Followup] - Make plugin name first item in description
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit d8f6315b6d9b1c7145f6036b55b7927f6d6e6e48)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 3bbb89c57181c113d64ec7649195de30b52d0806
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Thu Aug 10 13:02:23 2017 +0200

    Bug 19049: [Follow-up] Make sure that GetPlugins finds the plugin
    
    We have to mock_config the pluginsdir before Plugins is loaded, and
    we should pass an absolute path (not a relative one).
    If you did not install the test to_marc plugin, this test would fail.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    Verified patch is compatible with original KitchenSink to_marc plugin
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 0987b135ea0bb8fbd4fc39643b19715dc6e3a1c8)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit c6e3f2ac0575849a0b48170506a4986a50ac8bf1
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Tue Aug 8 14:51:41 2017 +0200

    Bug 19049: Testing RecordsFromMarcPlugin with a to_marc plugin
    
    This patch adds a simple to_marc plugin in t/Koha/Plugin that is used
    in the added subtest in ImportBatch.t.
    
    Test plan:
    [1] Run t/db_dependent/ImportBatch.t
    [2] Copy the to_marc test plugin from t to your plugin directory.
        Under Debian packages, you should do something like:
        mkdir -p /var/lib/koha/master/plugins/Koha/Plugin/
        cp [yourclone]/t/Koha/Plugin/MarcFieldValues.pm /var/lib/koha/master/plugins/Koha/Plugin/
    [3] Check if you see this plugin on plugins/plugins-home.pl
    [4] Create a text file with some fields like:
        (Note: The plugin needs an empty line between both "records".)
        100,a = Test Author 1
        245,a = Title One
    
        100,a = Author 2
        245,a = Title Two
    [5] Go to stage-marc-import.pl. Upload the created file. Select the plugin
        in the format combo and proceed. Did you create two records ?
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 83f60adbab8e96f0f14ec547029582623ac3a068)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 4dd020a3019cd7e2b357153ec737b15eea95f671
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Mon Aug 7 21:24:48 2017 +0200

    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 at rijksmuseum.nl>
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit d24568b67256fab79b42ead54302c76d1c9653d7)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

-----------------------------------------------------------------------

Summary of changes:
 C4/ImportBatch.pm                                  |   53 +++++++++---
 .../prog/en/modules/tools/stage-marc-import.tt     |   20 +----
 misc/stage_file.pl                                 |    2 +-
 t/Koha/Plugin/MarcFieldValues.pm                   |   86 ++++++++++++++++++++
 t/db_dependent/ImportBatch.t                       |   43 +++++++++-
 tools/stage-marc-import.pl                         |   10 ++-
 6 files changed, 179 insertions(+), 35 deletions(-)
 create mode 100644 t/Koha/Plugin/MarcFieldValues.pm


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list