bug 2258 - do not duplicate embedded items
If a MARC bib is modified by this batch job, do not duplicate the item tags embedded in it (e.g., 952 for MARC21). When modifying a bib record, any embedded item tags must be removed before calling ModBiblio - perhaps this should be moved to ModBiblio itself. Also removed an error in the job's help text. Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
fee2ddc086
commit
6858da97c3
1 changed files with 5 additions and 4 deletions
|
@ -85,6 +85,11 @@ sub process_bib {
|
|||
print "Bib $biblionumber ($title): $headings_changed headings changed\n";
|
||||
}
|
||||
if (not $test_only) {
|
||||
# delete any item tags
|
||||
my ($itemtag, $itemsubfield) = GetMarcFromKohaField("items.itemnumber", '');
|
||||
foreach my $field ($bib->field($itemtag)) {
|
||||
$bib->delete_field($field);
|
||||
}
|
||||
ModBiblio($bib, $biblionumber, GetFrameworkCode($biblionumber));
|
||||
$num_bibs_modified++;
|
||||
}
|
||||
|
@ -111,10 +116,6 @@ Parameters:
|
|||
--test only test the authority linking
|
||||
and report the results; do not
|
||||
change the bib records.
|
||||
--comment <comment> optional comment to describe
|
||||
the record batch; if the comment
|
||||
has spaces in it, surround the
|
||||
comment with quotation marks.
|
||||
--help or -h show this message.
|
||||
_USAGE_
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue