From ca0f229884e0ea4f5e13fff3117a078d89fd1f42 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 28 Oct 2021 11:00:29 +0000 Subject: [PATCH] Bug 29201: Add option to insert biblio_framework runtime parameter in SQL report This patch modifies the SQL report creation process so that the list of runtime parameters includes an option for bibliographic framework. To test, apply the patch and go to Reports -> Create from SQL. - Click the "Insert runtime parameter" menu button and select "Bibliographic framework." - You should be shown a modal dialog in which you can change the label on the framework input. - Click "Insert parameter." The SQL field should now contain the correct parameter, e.g. <> - Use the parameter to define an SQL query, e.g. "SELECT * FROM biblio WHERE frameworkcode = <> LIMIT 10" - Run the report. You should be asked to choose a framework. Confirm that the report runs correctly. Signed-off-by: Andrew Fuerste-Henry --- .../prog/en/modules/reports/guided_reports_start.tt | 6 ++++++ 1 file changed, 6 insertions(+) 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 e766923601..9f13a742fb 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 @@ -1530,6 +1530,11 @@ $("#authorised_value_category").show(); $("#authorised_value").prop("required", true ).attr("required", "required"); break; + case "insertFramework": + modalTitle.text( _("Insert bibliographic framework parameter") ); + $("#paramLabel").val( _("Framework") ); + $("#param_category").val("biblio_framework"); + break; case "insertDate": modalTitle.text( _("Insert date parameter") ); $("#paramLabel").val( _("Date") ); @@ -2277,6 +2282,7 @@