https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27945
--- Comment #25 from Marcel de Rooy <[email protected]> --- Side note Currently we use the following custom check to limit numbers: my $compdate = dt_from_string->add( days => -1 ); my $count = Koha::ArticleRequests->search([ { borrowernumber => $borrowernumber, status => ['PENDING','PROCESSING'] }, { borrowernumber => $borrowernumber, status => 'COMPLETED', updated_on => { '>', Koha::Database->new->schema->storage->datetime_parser->format_date($compdate) }}, ])->count; This does not take into consideration the new/requested and pending status. So pending is still new here. But it looks at the number of requests in the pipeline for the user PLUS the completed ones within the last 24 hours. Advantage illustrated by the example below: Proposed check: Say that the limit is 5. User submits 5 requests on Friday night, Saturday, Sunday and Monday morning. This makes that we need to process 20 requests coming in on Monday. "Custom" check: User may only submit 5 requests on Friday night if we did not complete requests during that day. He is not allowed any more requests during the weekend. Only when we complete say 1 request on Monday, he is allowed to submit another one on Tuesday (24 hours later). What do you think? -- 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/
