Bugzilla – Attachment 194881 Details for
Bug 41797
Tidy kohaTable block - reports/guided_reports_start
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41797: (QA follow-up) Fix empty results truthiness check
Bug-41797-QA-follow-up-Fix-empty-results-truthines.patch (text/plain), 1.45 KB, created by
Paul Derscheid
on 2026-03-06 17:54:58 UTC
(
hide
)
Description:
Bug 41797: (QA follow-up) Fix empty results truthiness check
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2026-03-06 17:54:58 UTC
Size:
1.45 KB
patch
obsolete
>From 64e203fe93dc781e88e02fcb91bb4971b28ee1e6 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Fri, 6 Mar 2026 18:37:06 +0100 >Subject: [PATCH] Bug 41797: (QA follow-up) Fix empty results truthiness check > >- The tidy converted a TT compile-time [% IF results %] to a > runtime JS check on original_results >- original_results is always an array (fallback to []) and an > empty array is truthy in JS, so the chart click handler was > always registered even with no results >- Check .length instead to match the original server-side behavior > >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > .../prog/en/modules/reports/guided_reports_start.tt | 2 +- > 1 file changed, 1 insertion(+), 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 e236c9cbd56..fb72d0f7b19 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 >@@ -2120,7 +2120,7 @@ > $("#download-chart").hide(); > var chart; > >- if (original_results && !has_errors) { >+ if (original_results.length && !has_errors) { > $("#draw-chart").click(function () { > var x_elements = $('select[name="x"]').val(); > var y_elements = []; >-- >2.39.5
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 41797
:
192741
|
192742
|
192791
|
192792
|
194493
|
194879
|
194880
| 194881