@@ -, +, @@ cases unless ( $self->dateaccessioned ) { $self->dateaccessioned($today); } my $result = $self->SUPER::store; if ( $log_action && C4::Context->preference("CataloguingLog") ) { $action eq 'create' ? logaction( "CATALOGUING", "ADD", $self->itemnumber, "item" ) : logaction( "CATALOGUING", "MODIFY", $self->itemnumber, "item " . Dumper( $self->unblessed ) ); } --- Koha/Object.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) --- a/Koha/Object.pm +++ a/Koha/Object.pm @@ -318,8 +318,17 @@ Returns an unblessed representation of object. sub unblessed { my ($self) = @_; - - return { $self->_result->get_columns }; + my %res = $self->_result->get_columns; + for my $k (keys %res) { + my $reftype = ref $res{$k}; + # overwrite current object-vaule with it's unblessed value + if( $reftype eq 'DateTime' ) { + $res{$k} = $res{$k}->stringify; + } elsif( $reftype ne '' ) { + warn "Don't know how to unbless ref '$reftype'"; + } + } + return \%res; } =head3 $object->get_from_storage; --