Bugzilla – Attachment 183052 Details for
Bug 39875
ILL - History check fails if unauthenticated request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39875: Dont show history check
Bug-39875-Dont-show-history-check.patch (text/plain), 1.55 KB, created by
Marcel de Rooy
on 2025-06-06 07:33:47 UTC
(
hide
)
Description:
Bug 39875: Dont show history check
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-06-06 07:33:47 UTC
Size:
1.55 KB
patch
obsolete
>From 7db7003c6a34acd408b34049bb50be06e4d82aad Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Mon, 12 May 2025 13:30:12 +0000 >Subject: [PATCH] Bug 39875: Dont show history check >Content-Type: text/plain; charset=utf-8 > >Unless there is a cardnumber or an authenticated user > >Test plan: >1) Apply only the the tests file highlighting the issue: >prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t >2) Notice it fails. >3) Apply this patch. >4) Run tests again. Notice it passes. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/ILL/Request/Workflow/HistoryCheck.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Koha/ILL/Request/Workflow/HistoryCheck.pm b/Koha/ILL/Request/Workflow/HistoryCheck.pm >index b8f7fb55d1..0483438c75 100644 >--- a/Koha/ILL/Request/Workflow/HistoryCheck.pm >+++ b/Koha/ILL/Request/Workflow/HistoryCheck.pm >@@ -193,9 +193,11 @@ sub _find_matching_requests { > @existing_id_fields = grep { $_ eq 'pubmedid' } @existing_id_fields; > } > >- my $patron = Koha::Patrons->find( >- { cardnumber => $self->{metadata}->{cardnumber} || C4::Context->userenv->{'cardnumber'} } ); >+ my $cardnumber = >+ $self->{metadata}->{cardnumber} || ( C4::Context->userenv && C4::Context->userenv->{'cardnumber'} ); >+ return 0 unless $cardnumber; > >+ my $patron = Koha::Patrons->find( { cardnumber => $cardnumber } ); > return 0 unless $patron; > > my $query; >-- >2.39.5
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 39875
:
182273
|
182274
|
182291
|
182292
|
182295
|
182296
|
182858
|
182859
|
183051
| 183052 |
183065