Bugzilla – Attachment 167120 Details for
Bug 36951
ILL request searching is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36951: Fix embed name mismatch batch vs. ill_batch
Bug-36951-Fix-embed-name-mismatch-batch-vs-illbatc.patch (text/plain), 2.05 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-05-23 15:53:46 UTC
(
hide
)
Description:
Bug 36951: Fix embed name mismatch batch vs. ill_batch
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-05-23 15:53:46 UTC
Size:
2.05 KB
patch
obsolete
>From ffd1a83641bab249e580b9065b9871545f35470b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 23 May 2024 12:44:46 -0300 >Subject: [PATCH] Bug 36951: Fix embed name mismatch batch vs. ill_batch > >This patch fixes a query error on the ILL requests page. > >This comes from an incomplete fix from bug 35093, which correctly >renamed the `batch` embed to `ill_batch`, but missed to change the >column `data` attribute on the DataTable. > >Because of that, when doing keyword searches, the KohaTable component >generates a query on `batch.name` instead of `ill_batch.name`, which >generates a 500 error (because Koha is not returning the right status on >DB query errors). > >To reproduce: >1. Have your KTD up, with some ILL backend: > $ ktd --shell > k$ bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2. Go to the ILL requests page >3. Perform any query on the top level filter box >=> FAIL: You get a 500. The logs say: > >``` >[ERROR] GET /api/v1/ill/requests: unhandled exception (Koha::Exceptions::BadParameter)<<Exception 'Koha::Exceptions::BadParameter' thrown 'Cannot find Koha::Object class for batch'>> >``` > >4. Apply this patch >5. Reload all the page contents (ctrl+shift+r or cmd+shift+r) >6. Repeat 3 >=> SUCCESS: No error! >7. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 8cf93d1baa4..eeac553a498 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -231,7 +231,7 @@ $(document).ready(function() { > } > }, > { >- "data": "batch.name", // batch >+ "data": "ill_batch.name", // ill_batch > "orderable": false, > "render": function(data, type, row, meta) { > return row.ill_batch ? >-- >2.45.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36951
: 167120