Bug 23463: (follow-up) Fix timestamp default value
For discussion, this patch revert the changes made previously.
This line exists in Koha::Item->store as it is the translation of:
if (exists $item->{'timestamp'}) {
delete $item->{'timestamp'};
}
that was coming from _do_column_fixes_for_mod (called from ModItem)
To preserve existing behavior I would be in favor of keeping it like that to
avoid regression, and deal with it separately if we want to improve/remove it.
So basically here we are setting it to undef in Koha::Item->store to make it
handle correctly by the parent Koha::Object->store. I agree that's kind of weird
and must be improved.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
794e8f992e
commit
57eb6e4226
|
|
@ -148,9 +148,7 @@ sub store {
|
|||
$self->permanent_location( $self->location );
|
||||
}
|
||||
|
||||
if ( $self->timestamp ) {
|
||||
$self->timestamp(dt_from_string); # Maybe move this to Koha::Object->store?
|
||||
}
|
||||
$self->timestamp(undef) if $self->timestamp; # Maybe move this to Koha::Object->store?
|
||||
|
||||
C4::Biblio::ModZebra( $self->biblionumber, "specialUpdate", "biblioserver" );
|
||||
|
||||
|
|
|
|||
|
|
@ -151,6 +151,12 @@ sub store {
|
|||
$self->_result()->set_column($col => $columns_info->{$col}->{default_value});
|
||||
}
|
||||
}
|
||||
elsif ( not defined $self->$col
|
||||
&& $columns_info->{$col}->{datetime_undef_if_invalid} )
|
||||
{
|
||||
# timestamp
|
||||
$self->$col( $columns_info->{$col}->{default_value} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue