@@ -, +, @@ explicitly passed 1 - Edit an item record to have a blank date accessioned 2 - Save the record as marcxml from the detail page 3 - Edit the item to have an accession date 4 - Stage and import the file - matching in KohaBiblio and replacing items 5 - Import the file 6 - Confirm the date accessioned is cleared 7 - Apply patch 8 - Provide an accession date for the item 9 - Stage and import the file again --- C4/Items.pm | 4 ++++ 1 file changed, 4 insertions(+) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -307,6 +307,10 @@ sub ModItemFromMarc { # to prevent it being blanked by set_or_blank $item->{onloan} = $item_object->onloan if( $item_object->onloan && !defined $item->{onloan} ); + # When importing and replacing items we should not remove the dateacquired so we should set it + # to the existing value + $item->{dateaccessioned} = $item_object->dateaccessioned if( $item_object->dateaccessioned && !defined $item->{dateaccessioned} ); + 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 ); --