Bugzilla – Attachment 182292 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.40 KB, created by
David Nind
on 2025-05-12 14:33:08 UTC
(
hide
)
Description:
Bug 39875: Dont show history check
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-05-12 14:33:08 UTC
Size:
1.40 KB
patch
obsolete
>From 545bf0ccc775a7980e74fd433b18d0fa401e07dd 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 > >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> >--- > Koha/ILL/Request/Workflow/HistoryCheck.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/ILL/Request/Workflow/HistoryCheck.pm b/Koha/ILL/Request/Workflow/HistoryCheck.pm >index b8f7fb55d1..0c01c59bbb 100644 >--- a/Koha/ILL/Request/Workflow/HistoryCheck.pm >+++ b/Koha/ILL/Request/Workflow/HistoryCheck.pm >@@ -193,9 +193,10 @@ 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