Bug 34598

Summary: Error 500 is shown when ILL request is not found
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: CLOSED FIXED QA Contact: Nick Clemens (kidclamp) <nick>
Severity: major    
Priority: P5 - low CC: fridolin.somers, magnus, martin.renvoize, nick, pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Attachments: Bug 34598: Improve handling of not found ILL request
Bug 34598: Improve handling of not found ILL request
Bug 34598: Improve handling of not found ILL request

Description Pedro Amorim 2023-08-23 14:55:39 UTC
To reproduce, on k-t-d:
1) Enable ILLmodule and install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit a request that doesn't exist (assuming empty illrequests table):
INTRA/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=1
3) Verify an error 500 is returned with message "Can't call method "backend_illview""
Comment 1 Pedro Amorim 2023-08-23 14:57:40 UTC
Created attachment 154712 [details] [review]
Bug 34598: Improve handling of not found ILL request

1) Enable ILLmodule and install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit a request that doesn't exist (assuming empty illrequests table):
INTRA/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=1
3) Verify an error 500 is returned with message "Can't call method "backend_illview""
4) Apply patch
5) Repeat steps 1-3. Verify that a "ILL request not found." message is now displayed
Comment 2 Owen Leonard 2023-08-24 12:36:58 UTC
Created attachment 154733 [details] [review]
Bug 34598: Improve handling of not found ILL request

1) Enable ILLmodule and install FreeForm, run:
   bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit a request that doesn't exist (assuming empty illrequests table):
   INTRA/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=1
3) Verify an error 500 is returned with message "Can't call method
   "backend_illview""
4) Apply patch
5) Repeat steps 1-3. Verify that a "ILL request not found." message is
   now displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Nick Clemens (kidclamp) 2023-08-24 13:22:22 UTC
Created attachment 154737 [details] [review]
Bug 34598: Improve handling of not found ILL request

1) Enable ILLmodule and install FreeForm, run:
   bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Visit a request that doesn't exist (assuming empty illrequests table):
   INTRA/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=1
3) Verify an error 500 is returned with message "Can't call method
   "backend_illview""
4) Apply patch
5) Repeat steps 1-3. Verify that a "ILL request not found." message is
   now displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-08-30 12:04:20 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-08-30 19:57:13 UTC
Enhancement not pushed to 23.05.x