https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27945

--- Comment #87 from Jonathan Druart <[email protected]> ---
I am not convinced by the COMPLETED, updated_on code:

 965 Returns true if the patron can request articles. As limits apply for the
patron
 966 on on the same day, those completed the same day are considered as
current.

 976     my $dtf = Koha::Database->new->schema->storage->datetime_parser;
 977     my $compdate = dt_from_string->add( days => -1 );
 978     my $count = Koha::ArticleRequests->search([
 979         { borrowernumber => $self->borrowernumber, status =>
['REQUESTED','PENDING','PROCESSING'] },
 980         { borrowernumber => $self->borrowernumber, status => 'COMPLETED',
updated_on => { '>', $dtf->format_date($compdate) }},

if today is Oct 1st, $dtf->format_date($compdate) will be Sept 30th and
updated_on > 2021-09-30 will return the rows updated yesterday as well.

There is no test coverage for that.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to