[Bug 42550] New: JS error on saved SQL reports page when there are no reports
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Bug ID: 42550 Summary: JS error on saved SQL reports page when there are no reports Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Reports Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com Depends on: 26553 If there are no saved SQL reports, the "rtable" variable is empty and triggers an error when called later. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26553 [Bug 26553] Remove KohaTable (columns_settings.inc) and use kohaTable (datatables.js) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Jonathan Druart <jonathan.druart@gmail.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=42550 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 198733 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198733&action=edit Bug 42550: Remove JS error from report list if none exist If there are no saved SQL reports, the "rtable" variable is empty and triggers an error when called later. Uncaught TypeError: can't access property "DataTable", rtable is undefined Test plan: /cgi-bin/koha/reports/guided_reports.pl?op=list Without reports => Without this patch there is a JS error in the console => With the patch the error is gone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com Assignee|oleonard@myacpl.org |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Sponsorship status|--- |Sponsored Comma delimited| |Athens County Public list of Sponsors| |Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 198734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198734&action=edit Bug 42550: JS error on saved SQL reports page when there are no reports This patch updates the guided reports template so prevent a JS error when viewing an empty list of saved SQL reports. References to the "rtable" variable should be dependent on a check for the existence of the variable, which is undefined if there are no saved reports. To test, apply the patch and go to Reports -> View saved. Test the view of saved reports when there are some saved SQL reports and when there are none. In both cases there should be no error in the browser console about "rtable" being undefined. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198734|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Owen Leonard <oleonard@myacpl.org> 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=42550 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198733|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 198735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198735&action=edit Bug 42550: Remove JS error from report list if none exist If there are no saved SQL reports, the "rtable" variable is empty and triggers an error when called later. Uncaught TypeError: can't access property "DataTable", rtable is undefined Test plan: /cgi-bin/koha/reports/guided_reports.pl?op=list Without reports => Without this patch there is a JS error in the console => With the patch the error is gone Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited|Athens County Public | list of Sponsors|Libraries | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|Sponsored |Unsponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198735|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 198775 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198775&action=edit Bug 42550: Remove JS error from report list if none exist If there are no saved SQL reports, the "rtable" variable is empty and triggers an error when called later. Uncaught TypeError: can't access property "DataTable", rtable is undefined Test plan: /cgi-bin/koha/reports/guided_reports.pl?op=list Without reports => Without this patch there is a JS error in the console => With the patch the error is gone Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- Added my signoff as well (didn't realise it was already signed off!). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lucas@bywatersolutions.com |y.org | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198775|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 200480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200480&action=edit Bug 42550: Remove JS error from report list if none exist If there are no saved SQL reports, the "rtable" variable is empty and triggers an error when called later. Uncaught TypeError: can't access property "DataTable", rtable is undefined Test plan: /cgi-bin/koha/reports/guided_reports.pl?op=list Without reports => Without this patch there is a JS error in the console => With the patch the error is gone Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.11.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=42550 --- Comment #7 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.11.00 |26.11.00,26.05.02 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42550 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to 26.05.x for the upcoming 26.05.02 release. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org