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

--- Comment #2 from David Cook <[email protected]> ---
It seems like there's a few ways this could be done.

One idea is to fetch every bib record that contains at least one $9 linkage and
then compiling a list of unique IDs for authority records. 

Then I'll run the following:

my $record = GetAuthority($authid);
merge({ mergefrom => $authid, MARCfrom => $record, mergeto => $authid, MARCto
=> $record });

But that will involve double-handling bib records. 

--

Alternatively, I suppose I could fetch every bib record that contains at least
one $9 linkage, and then run the following for each unique linkage:

my $record = GetAuthority($authid);
merge({ mergefrom => $authid, MARCfrom => $record, mergeto => $authid, MARCto
=> $record, biblionumbers => [$biblionumber] });

I could cache the $record object to reduce some database fetches, except that
merge() is super inefficient. 

--

I suppose I could write a custom function... 

It looks like the heading data is obtained using the following: "@record_to =
$MARCto->field($auth_tag_to_report_to)->subfields()"

Then create $field_to from @record_to, and then
$field->replace_with($field_to).

Of course, writing a new function adds complications, especially if I don't
want to refactor merge(), which is an intimidating task.

Maybe I will just maintain this locally as that is less risky.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to