[Bug 36158] New: Text on the "Show SQL code" button at guided_reports.pl breaks if report notice templates exist
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Bug ID: 36158 Summary: Text on the "Show SQL code" button at guided_reports.pl breaks if report notice templates exist Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: jrobb@sekls.org QA Contact: testopia@bugs.koha-community.org Created attachment 162386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162386&action=edit Broken text on 'Show SQL code' button When a report notice template exists (using the feature added in bug 34136), if you click the "Show SQL code" button after running a report the text on the button changes to something like "Koha::Notice::Template=HASH(xxxxx)" To replicate: - Create a notice with the module of "Reports" -- add something to the "Print" section. Example from the other bug: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] - Create and run a saved report. Example from the other bug: SELECT * FROM borrowers - Click the "Show SQL code" button -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |34136 CC| |pedro.amorim@ptfs-europe.co | |m Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 [Bug 34136] Add ability to render a report using a notice template -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 --- Comment #1 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 162389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162389&action=edit Bug 36158: Update t iterator variable It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |String patch Assignee|oleonard@myacpl.org |pedro.amorim@ptfs-europe.co | |m CC| |caroline.cyr-la-rose@inlibr | |o.com, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com Keywords| |Sandbox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162389|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 162393 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162393&action=edit Bug 36158: Update t iterator variable It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36157 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36157 [Bug 36157] Links in the "Run with template" dropdown at guided_reports.pl have odd formatting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162393|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 162581 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162581&action=edit Bug 36158: Update t iterator variable It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com Status|Signed Off |Passed QA --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial fix, clear code.. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.04 released in| | Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Martin Renvoize from comment #3)
Created attachment 162581 [details] [review] Bug 36158: Update t iterator variable
It seems like its causing some sort of conflict with t('Hide SQL code') further down below in the code, but I'm not sure why.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Arf there are other places with a var named "t" in TT :
git grep 'FOREACH t IN' origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt: [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -%] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt: [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.owned %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.shared %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.owned %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% FOREACH t IN item_templates.shared %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt: [% FOREACH t IN club_templates %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt: [% FOREACH t IN club_templates %] origin/master:koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt: [% FOREACH t IN terms %]
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 --- Comment #8 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Frido can you open a bug for this (if not already). I think it would also be interesting to understand why the conflict happens in the first place, as one would think "for t in templates" would only consider a 't' variable inside the "for" loop. But this was causing an issue somewhere else entirely in the code if I remember correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Pedro Amorim from comment #8)
Frido can you open a bug for this (if not already). I think it would also be interesting to understand why the conflict happens in the first place, as one would think "for t in templates" would only consider a 't' variable inside the "for" loop. But this was causing an issue somewhere else entirely in the code if I remember correctly.
I've filed a bug report for Template Toolkit: https://github.com/abw/Template2/issues/317 Kyle -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36297 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36297 [Bug 36297] Avoid using var named "t" in templates -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created bug 36297 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36297 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |lucas@bywatersolutions.com Status|Pushed to stable |RESOLVED --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Missing 23.05.x dependencies, no backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #12 from Christopher Brannon <cbrannon@cdalibrary.org> --- I'm in 24.05.02 and I can't get the Show SQL code to work on anything running in a template. Am I misunderstanding? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org