From 10b2315eb391761f98eb3af523e49439d870f504 Mon Sep 17 00:00:00 2001 From: rangi Date: Sat, 1 Apr 2006 22:10:50 +0000 Subject: [PATCH] Fixing the problem that all items were getting biblioitem=1 set --- C4/Biblio.pm | 7 +++++-- misc/migration_tools/bulkmarcimport.pl | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 81986a03d4..d3b70a389e 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1033,7 +1033,7 @@ creates an item from a MARC::Record sub NEWnewitem { my ( $dbh,$record,$biblionumber,$biblioitemnumber ) = @_; - + warn "here is the $biblioitemnumber"; # add item in old-DB my $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber); my $item = &MARCmarc2koha( $dbh,$record,$frameworkcode ); @@ -1454,7 +1454,7 @@ sub REALnewitems { if ( $item->{'loan'} ) { $item->{'notforloan'} = $item->{'loan'}; } - $item->{'biblioitemnumber'} = 1; +# $item->{'biblioitemnumber'} = 1; # if dateaccessioned is provided, use it. Otherwise, set to NOW() if ( $item->{'dateaccessioned'} ) { $sth = $dbh->prepare( "Insert into items set @@ -3014,6 +3014,9 @@ Paul POULAIN paul.poulain@free.fr # $Id$ # $Log$ +# Revision 1.166 2006/04/01 22:10:50 rangi +# Fixing the problem that all items were getting biblioitem=1 set +# # Revision 1.165 2006/04/01 21:22:05 rangi # Adding a little fake subroutine that a few scripts in the opac depend on, can be removed once the opac scripts are rewritten # diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index bf81ce2abd..5527306177 100644 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -160,10 +160,11 @@ warn "NUM:".$number; print "$i : $nbitems items found\n" if $verbose; # now, create biblio and items with NEWnewXX call. unless ($test_parameter) { - my ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$newRecord,''); + my ($bibid,$oldbibitemnum) = NEWnewbiblio($dbh,$newRecord,''); warn "ADDED biblio NB $bibid in DB\n" if $verbose; for (my $i=0;$i<=$#items;$i++) { - NEWnewitem($dbh,$items[$i],$bibid); + warn "here is the biblioitemnumber $oldbibitemnum"; + NEWnewitem($dbh,$items[$i],$bibid,$oldbibitemnum); } } } -- 2.20.1