[Koha] Recreate items table from Marc records

Galen Charlton galen.charlton at liblime.com
Wed May 27 02:54:10 NZST 2009


Hi,

2009/5/26 Andrew Yager <andrew at rwts.com.au>:
> Is there an easy way to recreate the data that belongs in the items table
> from Marc records with the appropriate information? We have some records
> that have item information, but do not have a corresponding item. The item
> data is there from an old import.

There isn't a script to do that, but it would be fairly easy to
construct one.  Pseudocode for it would be something like:

for each bib
  for each 952 in bib
    build MARC::Record that includes the item field
    my $item_parsed = TransformMarcToKoha($dbh, $source_item_marc,
$frameworkcode);
    next if $item_parsed->{itemnumber} has a corresponding items row
    call AddItemFromMarc($source_item_marc, $biblionumber)

Regards,

Galen
-- 
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt


More information about the Koha mailing list