From 07464b53ed303d8d62d793db385aaa5b9a42e960 Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 28 Oct 2021 14:15:12 +0000 Subject: [PATCH] Bug 29351: Add missing cn_source parameter to reports parameter menu This patch adds an option to insert "Source of classification or shelving scheme" as a runtime parameter in SQL reports. The ability to use cn_source as a parameter seems to have always been part of this feature but wasn't documented. To test, apply the patch and go to Reports -> Create from SQL. - Click the "Insert runtime parameter" button and select "Classification source." - Customize the parameter label if you wish and click "Insert parameter." - The parameter should be inserted like this: <> - Use it to create a valid SQL report, for example: SELECT * FROM items WHERE cn_source = <> LIMIT 10 - Confirm that upon running the report you are prompted to select a classification source. - Confirm that the report runs correctly. Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/reports/guided_reports_start.tt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 2fd6ca0aa7..6f26d2c20b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -1531,6 +1531,11 @@ $("label[for='authorised_value']").addClass("required"); $("#authorised_value").prop("required", true ).attr("required", "required").addClass("required"); break; + case "insertCnSource": + modalTitle.text( _("Insert classification source parameter") ); + $("#paramLabel").val( _("Source of classification or shelving scheme") ); + $("#param_category").val("cn_source"); + break; case "insertDate": modalTitle.text( _("Insert date parameter") ); $("#paramLabel").val( _("Date") ); @@ -2283,7 +2288,8 @@ Insert runtime parameter