[Koha-patches] [PATCH] [followup] (bug #4263) dateaccessionned is cleaned on item modification

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Fri Apr 23 13:55:03 CEST 2010


Every item modification, date accessionned is cleaned, if there is no modification made, we must'nt reset to "undef" the value.
---
 C4/Items.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/C4/Items.pm b/C4/Items.pm
index e5ae1cd..cc1b532 100644
--- a/C4/Items.pm
+++ b/C4/Items.pm
@@ -422,8 +422,9 @@ sub ModItemFromMarc {
 	my $localitemmarc=MARC::Record->new;
 	$localitemmarc->append_fields($item_marc->field($itemtag));
     my $item = &TransformMarcToKoha( $dbh, $localitemmarc, $frameworkcode, 'items');
+
     foreach my $item_field (keys %default_values_for_mod_from_marc) {
-        $item->{$item_field} = $default_values_for_mod_from_marc{$item_field} unless exists $item->{$item_field};
+        $item->{$item_field} = $default_values_for_mod_from_marc{$item_field} unless (exists $item->{$item_field} or not $default_values_for_mod_from_marc{$item_field});
     }
     my $unlinked_item_subfields = _get_unlinked_item_subfields($localitemmarc, $frameworkcode);
 
-- 
1.6.3.3




More information about the Koha-patches mailing list