The ILL requests table on the front page of the ILL module gives an error when the table is sorted on the column "Comments". There is another error when switching the records per page to any other value than 20. This is from the developer tools: DataTables warning: table id=ill-requests - Ajax error. For more information about this error, please see http://datatables.net/tn/7 datatables_23.1106000.js:467:13 Source map error: Error: request failed with status 404 Resource URL: .../intranet-tmpl/lib/datatables/datatables.min_23.1106000.js Source Map URL: pdfmake.min.js.map GET .../api/v1/ill/requests?_page=1&_per_page=100&_match=contains&_order_by=+me.comments_count REsponse: Internal server error Tested in Koha 23.11, might need confirmation in newer versions.
Created attachment 168311 [details] [review] Bug 37178: Disable sorting on comments column
The 'easy' fix here is to disable sorting on the column as that is a count processed value and not a value directly present on the ILL request table row. It may be easier than I think to implement sorting on that column but I don't have the time to invest in it at this point, happy to look at others suggestions here. I think the other error you mention about the records per page is a non-issue as I believe it only occurs once you've sorted by comments first, i.e. if you refresh the page and change the records per page it works fine.
I think deactivating sorting for that column would be fine for now if it makes the unfriendly errors go away. We can still revisit later.
Created attachment 172242 [details] [review] Bug 37178: Disable sorting on comments column Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Adding others here as it's a very trivial fix needing PQA.
Created attachment 174407 [details] [review] Bug 37178: Disable sorting on comments column Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Pushed for 24.11! Well done everyone, thank you!