[OPEN-ILS-DEV] Help with authority.merge_records

Whalen, Liam Liam.Whalen at NRCan-RNCan.gc.ca
Thu Sep 29 12:46:57 EDT 2011


> -----Original Message-----
> Behalf Of Whalen, Liam
> Sent: September 29, 2011 08:18
> 
> > -----Original Message-----
> Behalf Of 
> > Mike Rylander
> > Sent: September 28, 2011 22:22
> > On Wed, Sep 28, 2011 at 12:03 PM, Whalen, Liam 
> > <Liam.Whalen at nrcan-rncan.gc.ca> wrote:
> > > Our Authority merging process is not working properly.  Here is my
> > > situation: I have two bib records linked to two separate
> > authority records.
> > > Lets say Bib1 is Linked to Auth1 and Bib2 is linked to 
> Auth2.  If I 
> > > merge
> > > Auth2 into Auth1, the new Auth1 record displays as having 
> 2 records 
> > > associated with it, so I assume the linking in
> > authority.bib_linking
> > > is happening correctly.  However, when I examine the MARC
> > in Bib2, the
> > > authority link is still listed as $a Auth2.  However, the
> > $0 code is
> > > correctly updated.  So if Bib1 has a 650 with $a Auth1 $0
> > > (NRCAN-RNCAN) 1, and Bib2 had a 650 with $a Auth2 $0
> > (NRCAN-RNCAN) 2,
> > > then after the update
> > > Bib1 would still be the same but Bib2 would have a 650 like so: $a
> > > Auth2 $0
> > > (NRCAN-RNCAN) 1 (It should be $a Auth1 $0 (NRCAN-RNCAN) 1
> > after the update).
> > >
> > 
> > First, I'm looking at the master codebase (you didn't mention which 
> > you're testing or using), so this may not apply for you.
> 
> Sorry, I'm working with Evergreen 2.0.8, PostgreSQL 9.0, 
> Opensrf 2.0.0, And, Ubuntu 10.04.
> 
> > 
> > I'm not seeing this issue, but the most likely cause looks to be a 
> > missing or disabled trigger on authority.record_entry -- 
> specifically 
> > the trigger called aaa_auth_ingest_or_delete which calls 
> > authority.indexing_ingest_or_delete().  What's the output of
> > 

We have tested the Authority Merging on the community server, and it is
working properly there, so this is some sort of error with our install/data.

Trying to step through the SQL code for authority.merge_records is making my
head explode, so I've decided to simplify things a bit.  We see a similar
error when we try to update a single Authority Record.  When a single
authority record is updated, the changes in the authority's headings do not
propagate down to the bib records linked with them.

So, I setup a break point on authority.indexing_ingest_or_delete and then updated
one of my test authority records which is linked with a test bib record.

As I step through the execution of authority.indexing_ingest_or_delete, the code
goes from 
user_has_home_perm to
check_marcxml_well_formed to
maintain_901 to
org_unit_ancestor_setting to
indexing_ingest_or_delete to
reingest_authority_full_rec to
flatten_marc
indexing_ingest_or_delete where it finishes.

I've stepped into every section of the above SQL code, and I could not see 
any attempt to update biblio.record_entry to modify the MARC of the linked bib
to reflect the changes made to the authority record's heading.

This works on the community server, so we must be missing something crucial.
Does anyone have idea where in the authority.indexing_ingest_or_delete code 
a trigger should go off to force the linked bib record's MARC to be updated?

I just had a thought that maybe I was missing a trigger on the biblio schema,
but I just set breakpoints on the aaa_indexing_ingest_or_delete and
indexing_ingest_or_delete functions in biblio.record_entry and neither of them
triggered when I updated an authority record.

Liam


More information about the Open-ils-dev mailing list