Bug 39941

Summary: Adding a patron to an unauthenticated request should change the request's status to 'NEW'
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39941: Display user info message for UNAUTH requests
Bug 39941: Set status 'NEW' when patron added to UNAUTH request

Description Pedro Amorim 2025-05-20 10:04:50 UTC
For unauthenticated requests, the expected workflow is to - at some point - add an existing patron and then proceed with the request.
However, when adding a patron to the request, its status is still UNAUTH.
This causes no issues, but it's confusing for staff members as they've just added a patron. The request's status should be changed to 'NEW' when this happens.
Comment 1 Pedro Amorim 2025-05-20 10:15:58 UTC
Created attachment 182653 [details] [review]
Bug 39941: Display user info message for UNAUTH requests
Comment 2 Pedro Amorim 2025-05-20 10:16:00 UTC
Created attachment 182654 [details] [review]
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:
   <opac_url>/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:
   <staff_url>/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'.