Bug 25944

Summary: Bug in ill_requests patch schema
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: REST APIAssignee: Martin Renvoize <martin.renvoize>
Status: Pushed to oldoldstable --- QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: major    
Priority: P5 - low CC: aleisha, alex, katrin.fischer, lucas, magnus, tomascohen, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03, 19.11.09, 19.05.15
Bug Depends on: 20563, 21063    
Bug Blocks:    
Attachments: Bug 25944: Schema fix for illrequests route
Bug 25944: Schema fix for illrequests route
Bug 25944: Schema fix for illrequests route

Description Martin Renvoize 2020-07-07 12:12:45 UTC
Updating Mojo + OpenAPI dependencies has improved the strictness of the validator and highlighted some missing fields on the 'embed' enum.
Comment 1 Martin Renvoize 2020-07-07 12:24:02 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2020-07-13 18:49:07 UTC
Created attachment 106849 [details] [review]
Bug 25944: Schema fix for illrequests route

The illrequests path was missing the `comments` and `status_alias`
embedable relations in the path specification.

Test plan:
1/ Ensure you have the latest Mojolicious + OpenAPI modules installed.
2/ Navigate to the ill requests page and note that the table is empty.
3/ Note that under the networking tab in your browsers developer tools
that the api call fails with a 400 error.
4/ Apply the patch
5/ Refresh the page
6/ The table should now load and the api route should return a proper
200 response.
7/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Applied the patch to a production server that was having the 400
error on the main ILL page, and the error was gone.
Comment 3 Magnus Enger 2020-07-13 18:51:03 UTC
Tested on a regular Debian package install running version 19.11.07. I'd say this fixes a pretty major bug for libraries using ILL.
Comment 4 Tomás Cohen Arazi 2020-07-13 18:54:13 UTC
Created attachment 106850 [details] [review]
Bug 25944: Schema fix for illrequests route

The illrequests path was missing the `comments` and `status_alias`
embedable relations in the path specification.

Test plan:
1/ Ensure you have the latest Mojolicious + OpenAPI modules installed.
2/ Navigate to the ill requests page and note that the table is empty.
3/ Note that under the networking tab in your browsers developer tools
that the api call fails with a 400 error.
4/ Apply the patch
5/ Refresh the page
6/ The table should now load and the api route should return a proper
200 response.
7/ Signoff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Applied the patch to a production server that was having the 400
error on the main ILL page, and the error was gone.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Martin Renvoize 2020-07-16 14:42:55 UTC
Pushed to master for 20.11, thanks everyone.
Comment 6 Tomás Cohen Arazi 2020-07-23 19:51:28 UTC
Please backport to 20.05 and 19.11. ILL is broken.
Comment 7 Lucas Gass 2020-07-24 21:01:57 UTC
backported to 20.05.x for 20.05.03
Comment 8 Aleisha Amohia 2020-08-03 21:50:56 UTC
backported to 19.11.x for 19.11.09
Comment 9 Victor Grousset/tuxayo 2020-09-18 15:27:23 UTC
Backported to 19.05.x branch for 19.05.15