Bugzilla – Attachment 179784 Details for
Bug 36197
Allow unauthenticated ILL requests in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36197: (QA follow-up): Move unauthenticated_notes to core
Bug-36197-QA-follow-up-Move-unauthenticatednotes-t.patch (text/plain), 2.69 KB, created by
Pedro Amorim
on 2025-03-27 12:18:15 UTC
(
hide
)
Description:
Bug 36197: (QA follow-up): Move unauthenticated_notes to core
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-03-27 12:18:15 UTC
Size:
2.69 KB
patch
obsolete
>From 2efb8f6d90b98c99f0c0fc618446e49e49994534 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 17 Jan 2025 13:02:21 +0000 >Subject: [PATCH] Bug 36197: (QA follow-up): Move unauthenticated_notes to core > >Move this out of Standard specific logic. >Other backends that support unauthenticated requests may want to make use of this and not duplicate code. >Also make these notes translatable. >--- > Koha/ILL/Backend/Standard.pm | 10 +--------- > Koha/ILL/Request.pm | 22 +++++++++++++++++++++- > 2 files changed, 22 insertions(+), 10 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index 2fdc4ff98ee..af13dcaa8be 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -1015,15 +1015,7 @@ sub add_request { > } > } keys %{$request_details}; > $request->extended_attributes( \@request_details_array ); >- >- 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; >- } >+ $request->append_unauthenticated_notes( $params->{other} ) if $unauthenticated_request; > > return $request; > } >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index dc9659bca6a..f659d697bb2 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -34,7 +34,7 @@ use Koha::Cache::Memory::Lite; > use Koha::Database; > use Koha::DateUtils qw( dt_from_string ); > use Koha::Exceptions::Ill; >-use Koha::I18N qw(__); >+use Koha::I18N qw(__ __x); > use Koha::ILL::Backend::Standard; > use Koha::ILL::Batches; > use Koha::ILL::Comments; >@@ -1939,6 +1939,26 @@ sub attach_processors { > } > } > >+=head3 append_unauthenticated_notes >+ >+ append_unauthenticated_notes($metadata); >+ >+Append unauthenticated details to staff and opac notes >+ >+=cut >+ >+sub append_unauthenticated_notes { >+ my ( $self, $metadata ) = @_; >+ my $unauthenticated_notes_text = __x( >+ "Unauthenticated request.\nFirst name: {first_name}.\nLast name: {last_name}.\nEmail: {email}.", >+ first_name => $metadata->{'unauthenticated_first_name'}, >+ last_name => $metadata->{'unauthenticated_last_name'}, >+ email => $metadata->{'unauthenticated_email'} >+ ); >+ $self->append_to_note($unauthenticated_notes_text); >+ $self->notesopac($unauthenticated_notes_text)->store; >+} >+ > =head3 append_to_note > > append_to_note("Some text"); >-- >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
|
179764
|
179765
|
179766
|
179767
|
179769
|
179770
|
179771
|
179772
|
179773
|
179774
|
179775
|
179776
|
179777
|
179778
|
179779
|
179780
|
179781
|
179782
|
179783
|
179784
|
179785
|
180850
|
180851
|
180852
|
180853
|
180854
|
180855
|
180856
|
180857
|
180858
|
180859
|
180860
|
180861
|
180862
|
180863
|
180864
|
180865
|
180866
|
180867
|
180868
|
180869
|
180870
|
180871
|
180872
|
180873
|
181073
|
181074
|
181075
|
181076
|
181077
|
181078
|
181079
|
181080
|
181081
|
181082
|
181083
|
181084
|
181085
|
181086
|
181087
|
181088
|
181089
|
181090
|
181091
|
181092
|
181093
|
181094
|
181095
|
181096
|
181097
|
181098
|
181592