View | Details | Raw Unified | Return to bug 22273
Collapse All | Expand All

(-)a/Koha/ArticleRequest.pm (-10 / +5 lines)
Lines 196-211 will have notifications sent. Link Here
196
196
197
sub store {
197
sub store {
198
    my ($self) = @_;
198
    my ($self) = @_;
199
199
    if ( $self->in_storage ) {
200
    if ( $self->in_storage() ) {
200
        return $self->SUPER::store;
201
        my $now = dt_from_string();
201
    } else {
202
        $self->updated_on($now);
202
        $self->created_on( dt_from_string() );
203
203
        return $self->open;
204
        return $self->SUPER::store();
205
    }
206
    else {
207
        $self->open();
208
        return $self->SUPER::store();
209
    }
204
    }
210
}
205
}
211
206
(-)a/t/db_dependent/ArticleRequests.t (-3 / +3 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use POSIX qw(strftime);
20
use POSIX qw(strftime);
21
21
22
use Test::More tests => 56;
22
use Test::More tests => 57;
23
23
24
use t::lib::TestBuilder;
24
use t::lib::TestBuilder;
25
use t::lib::Mocks;
25
use t::lib::Mocks;
Lines 101-107 like( $notify_message->content, qr{Title: $article_request_title}, 'Values from Link Here
101
$article_request = Koha::ArticleRequests->find( $article_request->id );
101
$article_request = Koha::ArticleRequests->find( $article_request->id );
102
ok( $article_request->id, 'Koha::ArticleRequest created' );
102
ok( $article_request->id, 'Koha::ArticleRequest created' );
103
is( $article_request->status, Koha::ArticleRequest::Status::Pending, 'New article request has status of Open' );
103
is( $article_request->status, Koha::ArticleRequest::Status::Pending, 'New article request has status of Open' );
104
is( $article_request->updated_on, undef, 'New article request has not an updated_on date set yet' );
104
isnt( $article_request->created_on, undef, 'New article request has created_on date set' );
105
isnt( $article_request->updated_on, undef, 'New article request has updated_on date set' );
105
106
106
# process
107
# process
107
Koha::Notice::Messages->delete;
108
Koha::Notice::Messages->delete;
108
- 

Return to bug 22273