From f23636994e793dfa720c839ce66c40ca0878fd97 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 24 May 2018 18:51:03 +0000 Subject: [PATCH] Bug 20814: Display issue with 'Saved reports' tabs when memcached is off This patch changes the configuration of the saved reports table so that columns which were previously excluded from the table altogether are now hidden. This prevents a JavaScript error when DataTables tries to reference a missing column. To test, apply the patch and go to Reports -> Use saved. You should have at least one report category configured and assigned to reports in order for the tabs display to be visible. Test the table of saved reports under a variety of these circumstances: - memcached disabled or enabled - reports exist or don't exist which require update from the old marcxml syntax - cache_expiry and/or update columns are configured in Administration -> Columns settings to be shown or hidden The report category tabs and the table should render correctly under all circumstances. --- .../prog/en/modules/reports/guided_reports_start.tt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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 86c17e8..9dde026 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 @@ -177,9 +177,17 @@ canned reports and writing custom SQL reports.

Last run Public JSON URL - [% IF (usecache) %] Cache expiry (seconds) [% END %] + [% IF (usecache) %] + Cache expiry (seconds) + [% ELSE %] +   + [% END %] Saved results - [% IF has_obsolete_reports %]Update[% END %] + [% IF has_obsolete_reports %] + Update + [% ELSE %] +   + [% END %] Actions @@ -221,21 +229,19 @@ canned reports and writing custom SQL reports.

[% Koha.Preference('staffClientBaseURL') %]/cgi-bin/koha/svc/report?id=[% savedreport.id | html %] [% END %] - [% IF (usecache) %] [% savedreport.cache_expiry %] [% END %] + [% savedreport.cache_expiry %] [% FOR result IN savedreport.results %] [% result.date_run %]
[% END %] - [% IF has_obsolete_reports %] [% IF savedreport.seems_obsolete %] This report seems obsolete, it uses biblioitems.marcxml field. Update SQL [% END %] - [% END %]
@@ -998,7 +1004,8 @@ $(document).ready(function() { { 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1] }, { 'bSearchable': false, 'aTargets': [3] }, { "aTargets": [ 1, 2 ], "sType": "natural" }, - { "sType": "title-string", "aTargets" : [ "title-string" ] } + { "sType": "title-string", "aTargets" : [ "title-string" ] }, + { "visible": false, "aTargets" : [ "hidden" ] } ], 'oLanguage': { 'sZeroRecords': _("No matching reports found") -- 2.1.4