Bug 27981: Adjust imported records, svc/import_bibs, records from Z3950
Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Andrew Nugged <nugged@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
62b2fc31bd
commit
efbf8df4f8
4 changed files with 14 additions and 0 deletions
|
@ -584,6 +584,10 @@ sub BatchCommitRecords {
|
|||
foreach my $item_field ($marc_record->field($item_tag)) {
|
||||
$marc_record->delete_field($item_field);
|
||||
}
|
||||
if(C4::Context->preference('autoControlNumber') eq 'biblionumber'){
|
||||
my @control_num = $marc_record->field('001');
|
||||
$marc_record->delete_fields(@control_num);
|
||||
}
|
||||
}
|
||||
|
||||
my ($record_result, $item_result, $record_match) =
|
||||
|
|
|
@ -82,6 +82,10 @@ sub MARCfindbreeding {
|
|||
# remove the - in isbn, koha store isbn without any -
|
||||
if ($marc) {
|
||||
my $record = MARC::Record->new_from_usmarc($marc);
|
||||
if(C4::Context->preference('autoControlNumber') eq 'biblionumber'){
|
||||
my @control_num = $record->field('001');
|
||||
$record->delete_fields(@control_num);
|
||||
}
|
||||
my ($isbnfield,$isbnsubfield) = GetMarcFromKohaField( 'biblioitems.isbn' );
|
||||
if ( $record->field($isbnfield) ) {
|
||||
foreach my $field ( $record->field($isbnfield) ) {
|
||||
|
|
|
@ -412,6 +412,8 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
|
|||
|
||||
backends[ parts[0] ].get( parts[1], function( record ) {
|
||||
if ( !record.error ) {
|
||||
var remove_control_num = [% IF Koha.Preference('autoControlNumber') == 'OFF' %] 0 [% ELSE %] 1 [% END %];
|
||||
if( remove_control_num ){ record.removeField("001"); }
|
||||
editor.displayRecord( record );
|
||||
editor.focus();
|
||||
}
|
||||
|
|
|
@ -79,6 +79,10 @@ sub import_bib {
|
|||
$result->{'error'} = $@;
|
||||
return $result;
|
||||
}
|
||||
if(C4::Context->preference('autoControlNumber') eq 'biblionumber'){
|
||||
my @control_num = $record->field('001');
|
||||
$marc_record->delete_fields(@control_num);
|
||||
}
|
||||
|
||||
my $import_record_id = AddBiblioToBatch($batch_id, 0, $marc_record, "utf8", 1);
|
||||
my @import_items_ids = AddItemsToImportBiblio($batch_id, $import_record_id, $marc_record, 'UPDATE COUNTS');
|
||||
|
|
Loading…
Reference in a new issue