[Koha-bugs] [Bug 2466] can't remove value in item modif
bugzilla-daemon at pippin.metavore.com
bugzilla-daemon at pippin.metavore.com
Fri Aug 8 17:50:31 CEST 2008
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2466
------- Comment #1 from joe.atzberger at 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.
More information about the Koha-bugs
mailing list