X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=misc%2Flink_bibs_to_authorities.pl;h=0fc9c26f1a67f00c6f37903d9c76d6de0123f9db;hb=ec5d6794681f78bb13788fd0efc8579f8c426fa8;hp=1cb0483fd8e5ec1bfdbd0144f1f254440e446f16;hpb=226822aa0a877eb227c8753ae58ef4af2a3b5667;p=koha_gimpoz diff --git a/misc/link_bibs_to_authorities.pl b/misc/link_bibs_to_authorities.pl index 1cb0483fd8..0fc9c26f1a 100755 --- a/misc/link_bibs_to_authorities.pl +++ b/misc/link_bibs_to_authorities.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use strict; +use warnings; BEGIN { # find Koha's Perl modules # test carefully before changing this @@ -85,6 +86,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 +117,6 @@ Parameters: --test only test the authority linking and report the results; do not change the bib records. - --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_ }