Bugzilla – Attachment 124284 Details for
Bug 27945
Limit the number of active article requests per patron category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27945: (QA follow-up) Fix limit check
Bug-27945-QA-follow-up-Fix-limit-check.patch (text/plain), 1.57 KB, created by
Marcel de Rooy
on 2021-08-31 13:47:45 UTC
(
hide
)
Description:
Bug 27945: (QA follow-up) Fix limit check
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-08-31 13:47:45 UTC
Size:
1.57 KB
patch
obsolete
>From 169a8a264aa0db2fad3f804bc91448afb59de3a2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 31 Aug 2021 13:22:32 +0000 >Subject: [PATCH] Bug 27945: (QA follow-up) Fix limit check >Content-Type: text/plain; charset=utf-8 > >Resolve: > [WARN] SQL::Abstract::belch(): [SQL::Abstract::_where_field_op_ARRAYREF] Warning: A multi-element arrayref as an argument to the inequality op '!=' is technically equivalent to an always-true 1=1 (you probably wanted to say ...{ $inequality_op => [ -and => @values ] }... instead) at /usr/share/koha/Koha/Objects.pm line 601 > >In this case we can simply count the statuses PENDING and PROCESSING. >Note that bug 27944 will change that; PENDING should be replaced by >REQUESTED there. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index e66fdf4247..4a646cad5b 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -975,7 +975,7 @@ sub can_request_article { > my $dtf = Koha::Database->new->schema->storage->datetime_parser; > my $compdate = dt_from_string->add( days => -1 ); > my $count = Koha::ArticleRequests->search([ >- { borrowernumber => $self->borrowernumber, status => { '!=' => ['CANCELED','COMPLETED'] } }, >+ { borrowernumber => $self->borrowernumber, status => ['PENDING','PROCESSING'] }, > { borrowernumber => $self->borrowernumber, status => 'COMPLETED', updated_on => { '>', $dtf->format_date($compdate) }}, > ])->count; > return $count < $limit ? 1 : 0; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27945
:
123217
|
123218
|
123219
|
123220
|
123714
|
123715
|
123774
|
123775
|
123776
|
123777
|
123778
|
123820
|
124066
|
124067
|
124068
|
124069
|
124070
|
124071
|
124072
|
124073
|
124074
|
124075
|
124076
|
124077
|
124078
|
124079
|
124284
|
124285
|
124633
|
124673
|
124674
|
124675
|
124676
|
124677
|
124678
|
124679
|
124680
|
124681
|
124682
|
125140
|
125142
|
125143
|
125144
|
125145
|
125146
|
125147
|
125148
|
125149
|
125150
|
125151
|
125152
|
125178
|
125179
|
125569
|
125571
|
125638
|
125690
|
125702
|
125703
|
125704
|
125705
|
125706
|
125707
|
125726
|
125741
|
125761