Bugzilla – Attachment 174501 Details for
Bug 36197
Allow for OPAC unauthenticated ILL request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36197: Update how the request is added:
Bug-36197-Update-how-the-request-is-added.patch (text/plain), 2.33 KB, created by
Pedro Amorim
on 2024-11-14 11:37:29 UTC
(
hide
)
Description:
Bug 36197: Update how the request is added:
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-11-14 11:37:29 UTC
Size:
2.33 KB
patch
obsolete
>From 7c9e84e419330e4a09fb09de9f59af430c9d5595 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 5 Mar 2024 17:04:57 +0000 >Subject: [PATCH] Bug 36197: Update how the request is added: > >- Do not validate borrower if its an unauthenticated request >- Set borrowernumber to null if its an unauthenticated request >- Add staff and OPAC notes with unauthenticated request info > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/ILL/Backend/Standard.pm | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index 05d3a55ac6..777c312336 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -977,12 +977,15 @@ sub add_request { > > my ( $self, $params ) = @_; > >+ my $unauthenticated_request = >+ C4::Context->preference("ILLOpacUnauthenticatedRequest") && !$params->{other}->{'cardnumber'}; >+ > # ...Populate Illrequestattributes > # generate $request_details > my $request_details = _get_request_details( $params, $params->{other} ); > > my ( $brw_count, $brw ) = >- _validate_borrower( $params->{other}->{'cardnumber'} ); >+ _validate_borrower( $params->{other}->{'cardnumber'} ) unless $unauthenticated_request; > > ## Create request > >@@ -992,7 +995,7 @@ sub add_request { > # ...Populate Illrequest > my $request = $params->{request}; > $request->biblio_id($biblionumber) unless $biblionumber == 0; >- $request->borrowernumber( $brw->borrowernumber ); >+ $request->borrowernumber( $brw ? $brw->borrowernumber : undef ); > $request->branchcode( $params->{other}->{branchcode} ); > $request->status( $unauthenticated_request ? 'UNAUTH' : 'NEW'); > $request->backend( $params->{other}->{backend} ); >@@ -1017,6 +1020,15 @@ sub add_request { > } > } > >+ if ($unauthenticated_request) { >+ my $unauthenticated_notes_text = >+ "Unauthenticated request.\nFirst name: $params->{other}->{'unauthenticated_first_name'}" >+ . ".\nLast name: $params->{other}->{'unauthenticated_last_name'}." >+ . "\nEmail: $params->{other}->{'unauthenticated_email'}."; >+ $request->append_to_note($unauthenticated_notes_text); >+ $request->notesopac($unauthenticated_notes_text)->store; >+ } >+ > return $request; > } > >-- >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 36197
:
171358
|
171359
|
171360
|
171361
|
171362
|
171363
|
171364
|
171365
|
171366
|
171367
|
171368
|
171369
|
171370
|
171371
|
174495
|
174496
|
174497
|
174498
|
174499
|
174500
| 174501 |
174502
|
174503
|
174504
|
174505
|
174506
|
174507
|
174508
|
176564
|
176565
|
176680
|
176723
|
176724
|
176726
|
176727