Original fix from a patch on bug 5572.
Amended by Marcel de Rooy January 2017.
Note: This does not yet resolve the field order when merging to another
auth type, but is a good start.
Test plan:
Run t/db_dependent/Authorities/Merge.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
foreach my $subfield (@restore) {
$field_to->add_subfields($subfield->[0] =>$subfield->[1]);
}
- $marcrecord->delete_field($field);
- $marcrecord->insert_grouped_field($field_to);
+ $field->replace_with($field_to);
$update=1;
}
}#for each tag