[Koha-bugs] [Bug 20811] New: Fix wrong usage of ModBiblio in bulkmarcimport.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 24 11:36:48 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20811

            Bug ID: 20811
           Summary: Fix wrong usage of ModBiblio in bulkmarcimport.pl
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Command-line Utilities
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: magnus at libriotech.no
        QA Contact: testopia at bugs.koha-community.org
                CC: robin at catalyst.net.nz

In misc/migration_tools/bulkmarcimport.pl, line  454, ModBiblio is called like
so:

  eval { ( $biblionumber, $biblioitemnumber ) = ModBiblio( $record,
$biblionumber, GetFrameworkCode($biblionumber) ) };

But the POD for ModBiblio says:

  "Returns 1 on success 0 on failure"

So $biblionumber gets 1 or 0, and $biblioitemnumber never gets anything. This
leads to problems when ModBiblioMarc is called on line 487:

  ModBiblioMarc( $clone_record, $biblionumber, $framework );

If the ModBiblio was successfull, this will try to updated the record with
biblionumber = 1, which is most likely not what we want.

(I probably won't have the time to fix this soon, so please beat me to it!)

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list