From e2fcf814ee843f0bcf759f61ad33ddce22af5ad3 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 20 May 2025 10:09:59 +0000 Subject: [PATCH] Bug 39941: Set status 'NEW' when patron added to UNAUTH request Test plan: 1) Enable ILLModule and ILLOpacUnauthenticatedRequest 2) Log out, create an unauthenticated OPAC request, visit: /cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard 3) Add all required fields. Click 'Create'. 4) Log in on intra again, visit the ILL module: /cgi-bin/koha/ill/ill-requests.pl 5) Pick the request you just created and click the ID or 'Manage request' from the table. 6) Click 'Edit request'. Notice the info message is shown (Optional: Confirm that this info message is not shown any other request not UNAUTH) 7) Click 'Submit'. Repeat 5). Notice it's still 'Unauthenticated'. This is because a patron has not been added. 8) Repeat 6). Add a patron ID this time, e.g. the koha user on k-t-d: '51'. Click 'Submit'. 9) Repeat 5). Notice the status now displays 'New request'. --- ill/ill-requests.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl index 0db9c09b1eb..5aa06a0cbfe 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -293,6 +293,7 @@ if ($backends_available) { request => $request, ); } else { + $request->status('NEW') if $request->status eq 'UNAUTH' && $params->{borrowernumber}; $request->borrowernumber( $params->{borrowernumber} ); $request->biblio_id( $params->{biblio_id} ); $request->batch_id( $params->{batch_id} ); -- 2.39.5