From bd14a30affbcbffac5f7bc6469a8f84051be48f2 Mon Sep 17 00:00:00 2001 From: phette23 Date: Tue, 22 Jul 2025 15:45:00 -0700 Subject: [PATCH] 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 --- Koha/ILL/Backend/Standard.pm | 1 + .../bootstrap/en/includes/ill/backends/Standard/create.inc | 1 + .../en/includes/ill/backends/Standard/shared/notes.inc | 5 +++++ t/db_dependent/api/v1/ill_requests.t | 6 +++++- 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/notes.inc diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm index 444c0074d9..b93e300db5 100644 --- a/Koha/ILL/Backend/Standard.pm +++ b/Koha/ILL/Backend/Standard.pm @@ -1001,6 +1001,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( diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc index 4ef7691762..b5cd561e93 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/create.inc @@ -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 %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/notes.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/notes.inc new file mode 100644 index 0000000000..5ec10d4579 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/ill/backends/Standard/shared/notes.inc @@ -0,0 +1,5 @@ +
+ Notes + + +
diff --git a/t/db_dependent/api/v1/ill_requests.t b/t/db_dependent/api/v1/ill_requests.t index d44c6ccad7..25bc13c12e 100755 --- a/t/db_dependent/api/v1/ill_requests.t +++ b/t/db_dependent/api/v1/ill_requests.t @@ -416,7 +416,7 @@ subtest 'patron_list() tests' => sub { subtest 'add() tests' => sub { - plan tests => 2; + plan tests => 3; $schema->storage->txn_begin; @@ -525,5 +525,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; }; -- 2.50.1