@@ -, +, @@ indexing as a result of the marcxml transition.) Select two authorities to merge, start with two of the same type. Make sure that both are used in a few biblio records. Select at least one subfield from the authority to be removed for inclusion in the authority to be kept ("reference record"). Note: The number of attached records may not yet be updated. This depends on the speed of koha-indexer. If you wait a bit and refresh, you should have the correct number. First check the authority record again for the inserted subfield. Now check a biblio that was ALREADY attached to the reference record. And check a biblio that was FORMERLY attached to the deleted one. Note: See bug 17913 to see how pref AuthorityMergeMode impacts this. have the same authority type noting the remarks below. For instance try to merge from a CORPO_NAME to a PERSO_NAME record. Make a change in say 040$a of the record to be deleted. And select that field later on the merge form. Normally, you would use the PERSO_NAME framework in the merge now. When checking the authority record, look at 040a. When checking the record that was linked to the CORPO_NAME, check if it contains the PERSO_NAME authority in the correct field (say 100, 600, 700). --- authorities/merge.pl | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) --- a/authorities/merge.pl +++ a/authorities/merge.pl @@ -58,21 +58,16 @@ if ($merge) { $record->leader( GetAuthority($recordid1)->leader() ); # Modifying the reference record + # This triggers a merge for the biblios attached to $recordid1 ModAuthority( $recordid1, $record, $typecode ); - # Deleting the other record - if ( scalar(@errors) == 0 ) { + # Now merge for biblios attached to $recordid2 + # We ignore dontmerge now, since recordid2 is deleted + my $MARCfrom = GetAuthority( $recordid2 ); + &merge( $recordid2, $MARCfrom, $recordid1, $record ); - my $error; - if ($input->param('mergereference') eq 'breeding') { - require C4::ImportBatch; - C4::ImportBatch::SetImportRecordStatus( $recordid2, 'imported' ); - } else { - C4::AuthoritiesMarc::merge( $recordid2, GetAuthority($recordid2), $recordid1, $record ); - $error = (DelAuthority($recordid2) == 0); - } - push @errors, $error if ($error); - } + # Deleting the other record + DelAuthority( $recordid2 ); # Parameters $template->param( --