Bug 40105: Patrons cannot add notes when creating an ILL

Testing plan:
- Enable the ILLModule system preference
- Sign into the OPAC and make an ILL request at /cgi-bin/koha/opac-illrequests.pl
- Note there's no option to specify notes
- Apply the patch and restart services
- Make another ILL request
- Use the new notes field
- View the request and note that the notes value was saved

Sponsored-By: California College of the Arts
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
phette23 2025-07-22 15:45:00 -07:00 committed by Lucas Gass
parent c3cf41c275
commit 5940fb39d5
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
4 changed files with 12 additions and 1 deletions

View File

@ -948,6 +948,7 @@ sub add_request {
$request->branchcode( $params->{other}->{branchcode} );
$request->status( $unauthenticated_request ? 'UNAUTH' : 'NEW' );
$request->backend( $params->{other}->{backend} );
$request->notesopac( $params->{other}->{notesopac} ) if exists $params->{other}->{notesopac};
$request->placed( dt_from_string() );
$request->updated( dt_from_string() );
$request->batch_id(

View File

@ -103,6 +103,7 @@
[% IF type %]
[% INCLUDE "ill/backends/Standard/shared/forms/${type}.inc" %]
[% END %]
[% INCLUDE "ill/backends/Standard/shared/notes.inc" %]
[% INCLUDE "ill/backends/Standard/shared/custom_fields.inc" %]
[% IF whole.value.other.type && unauthenticated_ill && !logged_in_user %]
<fieldset class="rows" id="illrequest_captcha">

View File

@ -0,0 +1,5 @@
<fieldset class="rows" id="ill-standard-notes">
<legend>Notes</legend>
<label class="sr-only" for="notesopac">Notes:</label>
<textarea name="notesopac" id="notesopac" class="form-control input-fluid">[% whole.value.other.notesopac | html %]</textarea>
</fieldset>

View File

@ -428,7 +428,7 @@ subtest 'patron_list() tests' => sub {
subtest 'add() tests' => sub {
plan tests => 2;
plan tests => 3;
$schema->storage->txn_begin;
@ -537,5 +537,9 @@ subtest 'add() tests' => sub {
## Authorized user test
$t->post_ok( "//$userid:$password@/api/v1/ill/requests" => json => $body )->status_is(201);
# Confirm there is a notesopac value
my $req = Koha::ILL::Requests->search()->next;
ok( $req->notesopac, "notesopac value exists" ) if $req;
$schema->storage->txn_rollback;
};