[Bug 2466] can't remove value in item modif
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2466 ------- Comment #1 from joe.atzberger@liblime.com 2008-08-08 08:50 ------- Without disputing the symptom reported, I disagree that _koha_modify_item only updates populated values. ... my $query = "UPDATE items SET "; my @bind; for my $key ( keys %$item ) { $query.="$key=?,"; push @bind, $item->{$key}; } $query =~ s/,$//; $query .= " WHERE itemnumber=?"; push @bind, $item->{'itemnumber'}; my $sth = C4::Context->dbh->prepare($query); $sth->execute(@bind); ... So _koha_modify_item will modify values to empty-string if they are passed, i.e.: $item = { itemnumber=>531, field_x=>"", field_y=""}; ModItem also does not filter down the fields passed except to ensure cn.sort is calculated, and notforloan/damaged/itemlost/wthdrawn are 0 instead of "" or undef. That leaves ModItemFromMarc as the remaining suspect. It uses TransformMarcToKoha and _get_unlinked_item_subfields. ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
participants (1)
-
bugzilla-daemon@pippin.metavore.com