View | Details | Raw Unified | Return to bug 15869
Collapse All | Expand All

(-)a/C4/ImportBatch.pm (-1 / +3 lines)
Lines 559-564 sub BatchFindDuplicates { Link Here
559
sub BatchCommitRecords {
559
sub BatchCommitRecords {
560
    my $batch_id = shift;
560
    my $batch_id = shift;
561
    my $framework = shift;
561
    my $framework = shift;
562
    my $overlay_framework = shift;
562
563
563
    # optional callback to monitor status 
564
    # optional callback to monitor status 
564
    # of job
565
    # of job
Lines 666-672 sub BatchCommitRecords { Link Here
666
                }
667
                }
667
                $oldxml = $old_marc->as_xml($marc_type);
668
                $oldxml = $old_marc->as_xml($marc_type);
668
669
669
                ModBiblio($marc_record, $recordid, $oldbiblio->frameworkcode);
670
                if ($overlay_framework == '_USE_ORIG_') { $overlay_framework = $oldbiblio->frameworkcode; }
671
                ModBiblio($marc_record, $recordid, $overlay_framework);
670
                $query = "UPDATE import_biblios SET matched_biblionumber = ? WHERE import_record_id = ?";
672
                $query = "UPDATE import_biblios SET matched_biblionumber = ? WHERE import_record_id = ?";
671
673
672
                if ($item_result eq 'create_new' || $item_result eq 'replace') {
674
                if ($item_result eq 'create_new' || $item_result eq 'replace') {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (+9 lines)
Lines 210-215 Link Here
210
          <option value="[% framework.frameworkcode %]">[% framework.frameworktext %]</option>
210
          <option value="[% framework.frameworkcode %]">[% framework.frameworktext %]</option>
211
      [% END %]
211
      [% END %]
212
    </select>
212
    </select>
213
    <br/>
214
    When replacing records use this framework:
215
    <select name="overlay_framework" id="overlay_frameworks">
216
      <option value="_USE_ORIG_">Keep original framework</option>
217
      <option value="">Default</option>
218
      [% FOREACH framework IN frameworks %]
219
          <option value="[% framework.value %]">[% framework.label %]</option>
220
      [% END %]
221
    </select>
213
    [% END %]
222
    [% END %]
214
    <br/>
223
    <br/>
215
    <input type="submit" class="button" name="mainformsubmit" value="Import this batch into the catalog" />
224
    <input type="submit" class="button" name="mainformsubmit" value="Import this batch into the catalog" />
(-)a/tools/manage-marc-import.pl (-3 / +3 lines)
Lines 100-106 if ($op eq "") { Link Here
100
        add_saved_job_results_to_template($template, $completedJobID);
100
        add_saved_job_results_to_template($template, $completedJobID);
101
    } else {
101
    } else {
102
        my $framework = $input->param('framework');
102
        my $framework = $input->param('framework');
103
        commit_batch($template, $import_batch_id, $framework);
103
        my $overlay_framework = $input->param('overlay_framework');
104
        commit_batch($template, $import_batch_id, $framework, $overlay_framework);
104
    }
105
    }
105
    import_records_list($template, $import_batch_id, $offset, $results_per_page);
106
    import_records_list($template, $import_batch_id, $offset, $results_per_page);
106
} elsif ($op eq "revert-batch") {
107
} elsif ($op eq "revert-batch") {
Lines 231-237 sub import_batches_list { Link Here
231
}
232
}
232
233
233
sub commit_batch {
234
sub commit_batch {
234
    my ($template, $import_batch_id, $framework) = @_;
235
    my ($template, $import_batch_id, $framework, $overlay_framework) = @_;
235
236
236
    my $job = undef;
237
    my $job = undef;
237
    my ( $num_added, $num_updated, $num_items_added,
238
    my ( $num_added, $num_updated, $num_items_added,
238
- 

Return to bug 15869