[Koha-bugs] [Bug 5657] New: biblio records update fails when updating multiple authorities linked with the same biblio

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 25 19:39:32 CET 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5657

           Summary: biblio records update fails when updating multiple
                    authorities linked with the same biblio
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: MARC Authority data support
        AssignedTo: gmcharlt at gmail.com
        ReportedBy: januszop at gmail.com
         QAContact: koha-bugs at lists.koha-community.org
                CC: ian.walls at bywatersolutions.com
   Estimated Hours: 0.0


Created attachment 3022
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3022
Proposed patch

There is a following issue in authority support, when updating multiple
authorities and then updating biblio records in batch (in Zebra mode).  If both
happens: 1) two authorities linked with the same bibliographic record are
updated; 2) and then between two subsequent calls of the merge function (i.e.
by merge_authority.pl script) the zebra database will not be updated, then
after the second call of the merge function the field controlled by the first
authority will return to its original state.  This is because in the merge
functions (in Zebra mode) the bibliographic records to be updated are collected
from zebra database and not from sql database, which contains the fresh updated
version of records.

Imagine the following scenario:  there are two authors of a work described by
record R, say A and B.  A and B have their authority records.  We are updating
both authority records and the authors become now A1 and B1 (in authorities). 
We have Zebra indexes and dontmerge syspref set to 1.  Now we run
merge_authority.pl script in batch mode.  After the first run of the while loop
author A in R becomes A1 (and R becomes R1) and the updated record is stored
(by ModBiblio called from merge) only in sql database.  So far so good.  But
then, in the second run, merge functions selects records for update from zebra
database so, if zebra queue processing was not fast enough or was switched off
at the moment, what will be updated now is R from zebra database (and not R1
from sql database).  And therefore after the second run we get R2, where the
second author is B1, but first is still A. 

Attached is a simple workaround.  Comments are welcome.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Koha-bugs mailing list