@@ -, +, @@ 1 - Create some records using one framework 2 - Export the records 3 - Edit the records to add fields not in original framework 4 - Stage records using a rule that will find matches 5 - Import 6 - Note records contain new fields on display, but they are lost on edit 7 - Apply patch 8 - Stage records again 9 - Select a framework that contains the new fields on import --- C4/ImportBatch.pm | 4 +++- .../intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt | 9 +++++++++ tools/manage-marc-import.pl | 5 +++-- 3 files changed, 15 insertions(+), 3 deletions(-) --- a/C4/ImportBatch.pm +++ a/C4/ImportBatch.pm @@ -559,6 +559,7 @@ sub BatchFindDuplicates { sub BatchCommitRecords { my $batch_id = shift; my $framework = shift; + my $overlay_framework = shift; # optional callback to monitor status # of job @@ -666,7 +667,8 @@ sub BatchCommitRecords { } $oldxml = $old_marc->as_xml($marc_type); - ModBiblio($marc_record, $recordid, $oldbiblio->frameworkcode); + if ($overlay_framework == '_USE_ORIG_') { $overlay_framework = $oldbiblio->frameworkcode; } + ModBiblio($marc_record, $recordid, $overlay_framework); $query = "UPDATE import_biblios SET matched_biblionumber = ? WHERE import_record_id = ?"; if ($item_result eq 'create_new' || $item_result eq 'replace') { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -210,6 +210,15 @@ [% END %] +
+ When replacing records use this framework: + [% END %]
--- a/tools/manage-marc-import.pl +++ a/tools/manage-marc-import.pl @@ -100,7 +100,8 @@ if ($op eq "") { add_saved_job_results_to_template($template, $completedJobID); } else { my $framework = $input->param('framework'); - commit_batch($template, $import_batch_id, $framework); + my $overlay_framework = $input->param('overlay_framework'); + commit_batch($template, $import_batch_id, $framework, $overlay_framework); } import_records_list($template, $import_batch_id, $offset, $results_per_page); } elsif ($op eq "revert-batch") { @@ -231,7 +232,7 @@ sub import_batches_list { } sub commit_batch { - my ($template, $import_batch_id, $framework) = @_; + my ($template, $import_batch_id, $framework, $overlay_framework) = @_; my $job = undef; my ( $num_added, $num_updated, $num_items_added, --