From 0d7d2c592be34456981b90fc95dc7d8d7b5e5407 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Fri, 28 Sep 2018 13:44:16 +0100 Subject: [PATCH] Bug 20996: (follow-up) Fix column name expectation This bug changes how request metadata is obtained. Previously the appropriate backend's metadata function would return it. For at least the FreeForm backend, the metadata property names we title cased. The datatable JS was expecting this and breaks with the new metadata getting which is performed in the API controller, which just returns the property names as they appear in the DB. This patch changes the expectation of the JS to match what's coming back from the API Signed-off-by: Magnus Enger Tested by repeatedly loading the API-call http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library in Chromium and watching the reported time to load the URL. There is a siginificant decrease in the time with the patches compared to the time it takes without the patches. I had some concerns along the way, but they have all been fixed. Signed-off-by: Magnus Enger Tested by repeatedly loading the API-call http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library in Chromium and watching the reported time to load the URL. There is a siginificant decrease in the time with the patches compared to the time it takes without the patches. I had some concerns along the way, but they have all been fixed. --- koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index e4e710f2d4..4c13161884 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -43,8 +43,8 @@ // The core fields that should be displayed first var core = [ - 'metadata_Author', - 'metadata_Title', + 'metadata_author', + 'metadata_title', 'borrowername', 'biblio_id', 'library', -- 2.11.0