@@ -, +, @@ 1 - Check an item out to a paron 2 - Export the item using Tools->Export data 3 - Stage the record for import 4 - Match on 999c and replace items 5 - Import the batch 6 - View the record and note item is checked out and Available 7 - In the DB note the onloan value is now null 8 - Check in the item 9 - Apply patch --- C4/Items.pm | 4 ++++ 1 file changed, 4 insertions(+) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -303,6 +303,10 @@ sub ModItemFromMarc { my $item_object = Koha::Items->find($itemnumber); my $item = TransformMarcToKoha( $localitemmarc, $frameworkcode, 'items' ); + # When importing items we blank this column, we need to set it to the existing value + # to prevent it being blanked by set_or_blank + $item->{onloan} = $item_object->onloan if( $item_object->onloan && !defined $item->{onloan} ); + my ( $perm_loc_tag, $perm_loc_subfield ) = C4::Biblio::GetMarcFromKohaField( "items.permanent_location" ); my $has_permanent_location = defined $perm_loc_tag && defined $item_marc->subfield( $perm_loc_tag, $perm_loc_subfield ); --