Bugzilla – Attachment 154421 Details for
Bug 34533
jsdiff library missing from guided reports page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34533: jsdiff library missing from guided reports page
Bug-34533-jsdiff-library-missing-from-guided-repor.patch (text/plain), 2.67 KB, created by
Owen Leonard
on 2023-08-15 09:19:50 UTC
(
hide
)
Description:
Bug 34533: jsdiff library missing from guided reports page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-08-15 09:19:50 UTC
Size:
2.67 KB
patch
obsolete
>From ad75623de76f42309cb5c198d6b131aeb6cf4240 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 15 Aug 2023 08:38:20 +0000 >Subject: [PATCH] Bug 34533: jsdiff library missing from guided reports page > >This patch restores the inclusion of the jsdiff JS library on the guided >reports page when displaying saved SQL reports. This fixes a JS error in >the browser console when the user tries to use our automatic update on >SQL reports which use an older syntax. > >The patch also corrects a problem with svc/convert_report which was >causing an error when trying to display the diff information. > >To test, apply the patch and restart services. > >- Go to Reports -> Create from SQL. >- Add a report which is based on an older db structure. The example I > found was: > > SELECT biblionumber, > ExtractValue(marcxml,'//datafield/@tag/text()[substring(.,1,1) = "5"]') as 'notes' > FROM biblioitems > HAVING notes <> '' > >- Save the report and go to the list of saved reports. There should be > an "Update" column in the table, with a message about your newly-added > report: > > "This report seems obsolete, it uses biblioitems.marcxml field." > >- Clicking the "Update SQL" button should trigger a modal window that > shows the before an after versions of the report. There should be > no error in the browser console. Unfortunately the diff will not > display because of a separate bug in svc/convert_report >--- > .../prog/en/modules/reports/guided_reports_start.tt | 1 + > svc/convert_report | 4 ++-- > 2 files changed, 3 insertions(+), 2 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 9a037da8cd6..d959b1f4cf0 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 >@@ -1477,6 +1477,7 @@ > [% INCLUDE 'datatables.inc' %] > [% IF ( saved1 ) %] > [% INCLUDE 'columns_settings.inc' %] >+ [% Asset.js( "lib/jsdiff/jsdiff.min.js" ) | $raw %] > [% END %] > [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %] > [% Asset.js( "lib/codemirror/overlay.min.js" ) | $raw %] >diff --git a/svc/convert_report b/svc/convert_report >index 36c8b9948b7..b2779212d4a 100755 >--- a/svc/convert_report >+++ b/svc/convert_report >@@ -19,10 +19,10 @@ > > use Modern::Perl; > >-use C4::Auth; > use C4::Reports::Guided; > use Koha::Reports; >-use C4::Output; >+use C4::Auth qw( get_template_and_user get_session ); >+use C4::Output qw( output_html_with_http_headers ); > use CGI qw ( -utf8 ); > > my $query = CGI->new(); >-- >2.30.2
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 34533
:
154421
|
154756