@@ -, +, @@ created_on to PROCESSING. Check created_on and updated_on in the article_requests table. The changed request should have updated_on > created_on. --- Koha/ArticleRequest.pm | 15 +++++---------- t/db_dependent/ArticleRequests.t | 5 +++-- 2 files changed, 8 insertions(+), 12 deletions(-) --- a/Koha/ArticleRequest.pm +++ a/Koha/ArticleRequest.pm @@ -196,16 +196,11 @@ will have notifications sent. sub store { my ($self) = @_; - - if ( $self->in_storage() ) { - my $now = dt_from_string(); - $self->updated_on($now); - - return $self->SUPER::store(); - } - else { - $self->open(); - return $self->SUPER::store(); + if ( $self->in_storage ) { + return $self->SUPER::store; + } else { + $self->created_on( dt_from_string() ); + return $self->open; } } --- a/t/db_dependent/ArticleRequests.t +++ a/t/db_dependent/ArticleRequests.t @@ -19,7 +19,7 @@ use Modern::Perl; use POSIX qw(strftime); -use Test::More tests => 56; +use Test::More tests => 57; use t::lib::TestBuilder; use t::lib::Mocks; @@ -101,7 +101,8 @@ like( $notify_message->content, qr{Title: $article_request_title}, 'Values from $article_request = Koha::ArticleRequests->find( $article_request->id ); ok( $article_request->id, 'Koha::ArticleRequest created' ); is( $article_request->status, Koha::ArticleRequest::Status::Pending, 'New article request has status of Open' ); -is( $article_request->updated_on, undef, 'New article request has not an updated_on date set yet' ); +isnt( $article_request->created_on, undef, 'New article request has created_on date set' ); +isnt( $article_request->updated_on, undef, 'New article request has updated_on date set' ); # process Koha::Notice::Messages->delete; --