@@ -, +, @@ OR manually add the biblio to zebraqueue for reindexing --- C4/Biblio.pm | 4 ++-- misc/migration_tools/rebuild_zebra.pl | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -1070,9 +1070,9 @@ sub GetMarcBiblio { if ($@) { warn " problem with :$biblionumber : $@ \n$marcxml"; } return unless $record; + C4::Biblio::_koha_marc_update_bib_ids($record, '', $biblionumber, $biblionumber); C4::Biblio::EmbedItemsInMarcBiblio($record, $biblionumber) if ($embeditems); - # $record = MARC::Record::new_from_usmarc( $marc) if $marc; return $record; } else { return undef; @@ -2730,7 +2730,7 @@ sub EmbedItemsInMarcBiblio { my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber); push @item_fields, $item_marc->field($itemtag); } - $marc->insert_fields_ordered(@item_fields); + $marc->append_fields(@item_fields); } =head1 INTERNAL FUNCTIONS --- a/misc/migration_tools/rebuild_zebra.pl +++ a/misc/migration_tools/rebuild_zebra.pl @@ -433,10 +433,7 @@ sub get_corrected_marc_record { if (defined $marc) { fix_leader($marc); - if ($record_type eq 'biblio') { - my $succeeded = fix_biblio_ids($marc, $record_number); - return unless $succeeded; - } else { + if ($record_type eq 'authority') { fix_authority_id($marc, $record_number); } if (C4::Context->preference("marcflavour") eq "UNIMARC") { @@ -468,7 +465,7 @@ sub get_raw_marc_record { $fetch_sth->finish(); return unless $marc; } else { - eval { $marc = GetMarcBiblio($record_number); }; + eval { $marc = GetMarcBiblio($record_number, 1); }; if ($@ || !$marc) { # here we do warn since catching an exception # means that the bib was found but failed @@ -477,8 +474,6 @@ sub get_raw_marc_record { return; } } - # ITEM - C4::Biblio::EmbedItemsInMarcBiblio($marc, $record_number); } else { eval { $marc = GetAuthority($record_number); }; if ($@) { --