[Bug 21215] New: Saved SQL reports code improvements
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Bug ID: 21215 Summary: Saved SQL reports code improvements Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: pasi.kallinen@joensuu.fi QA Contact: testopia@bugs.koha-community.org The code for the saved SQL reports is a bit warty - For example, there's the same code that splits the SQL and does the parameter parsing in multiple places, when it should be in the module. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pasi.kallinen@joensuu.fi |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 --- Comment #1 from paxed <pasi.kallinen@joensuu.fi> --- Created attachment 77776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77776&action=edit Bug 21215: Saved SQL reports code improvements The saved SQL reports code is a bit warty, so improve it: Instead of using the same code in multiple places to split the SQL move that code into the Guided.pm module Add several tests for parameter substitution Make it much easier to add more parameter types for substitution. Test plan: 1) Run your saved SQL reports and check that they work correctly 2) Create new SQL reports and check that the parameters are queried correctly. 3) Prove the t/db_dependent/Reports/Guided.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 paxed <pasi.kallinen@joensuu.fi> 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=21215 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77776|0 |1 is obsolete| | --- Comment #2 from paxed <pasi.kallinen@joensuu.fi> --- Created attachment 77781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77781&action=edit Bug 21215: Saved SQL reports code improvements The saved SQL reports code is a bit warty, so improve it: Instead of using the same code in multiple places to split the SQL move that code into the Guided.pm module. Add several tests for parameter substitution and SQL validation. Make it much easier to add more parameter types for substitution. Test plan: 1) Run your saved SQL reports and check that they work correctly 2) Create new SQL reports and check that the parameters are queried correctly. 3) Prove the t/db_dependent/Reports/Guided.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Michal Denar <black23@gmail.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=21215 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77781|0 |1 is obsolete| | --- Comment #3 from Michal Denar <black23@gmail.com> --- Created attachment 79060 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79060&action=edit Bug 21215: Saved SQL reports code improvements The saved SQL reports code is a bit warty, so improve it: Instead of using the same code in multiple places to split the SQL move that code into the Guided.pm module. Add several tests for parameter substitution and SQL validation. Make it much easier to add more parameter types for substitution. Test plan: 1) Run your saved SQL reports and check that they work correctly 2) Create new SQL reports and check that the parameters are queried correctly. 3) Prove the t/db_dependent/Reports/Guided.t Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Michal Denar <black23@gmail.coml> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Lots of tabs introduced so we're failing the QA scripts I'm afraid.. Otherwise I like it.. please fix the tabs Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 --- Comment #5 from paxed <pasi.kallinen@joensuu.fi> --- (In reply to Martin Renvoize from comment #4)
Lots of tabs introduced so we're failing the QA scripts I'm afraid..
Otherwise I like it.. please fix the tabs
Failed QA
Whoops. A misconfigured text editor in the koha container was the culprit. Will fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79060|0 |1 is obsolete| | --- Comment #6 from paxed <pasi.kallinen@joensuu.fi> --- Created attachment 80585 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80585&action=edit Bug 21215: Saved SQL reports code improvements The saved SQL reports code is a bit warty, so improve it: Instead of using the same code in multiple places to split the SQL move that code into the Guided.pm module. Add several tests for parameter substitution and SQL validation. Make it much easier to add more parameter types for substitution. Test plan: 1) Run your saved SQL reports and check that they work correctly 2) Create new SQL reports and check that the parameters are queried correctly. 3) Prove the t/db_dependent/Reports/Guided.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80585|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 80710 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80710&action=edit Bug 21215: Saved SQL reports code improvements The saved SQL reports code is a bit warty, so improve it: Instead of using the same code in multiple places to split the SQL move that code into the Guided.pm module. Add several tests for parameter substitution and SQL validation. Make it much easier to add more parameter types for substitution. Test plan: 1) Run your saved SQL reports and check that they work correctly 2) Create new SQL reports and check that the parameters are queried correctly. 3) Prove the t/db_dependent/Reports/Guided.t Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> 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=21215 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80710|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 80711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80711&action=edit Bug 21215: Saved SQL reports code improvements The saved SQL reports code is a bit warty, so improve it: Instead of using the same code in multiple places to split the SQL move that code into the Guided.pm module. Add several tests for parameter substitution and SQL validation. Make it much easier to add more parameter types for substitution. Test plan: 1) Run your saved SQL reports and check that they work correctly 2) Create new SQL reports and check that the parameters are queried correctly. 3) Prove the t/db_dependent/Reports/Guided.t Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Michal Denar <black23@gmail.coml> 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=21215 Martin Renvoize <martin.renvoize@ptfs-europe.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=21215 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for the quick followup. Works well, passes all tests and no regressions found. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21763 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_18_11_candidate CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- This is not working for me with reports with parameters SELECT itemcallnumber, barcode FROM items WHERE barcode LIKE <<Barcode>> If i enter "%9" I get results before the patch, but none after SELECT <<cat>>,<<dog>>,<<cat>> I get two input boxes, enter "this", "that" I get NULL, NULL NULL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- I also added a see also to bug 21763 - I would strongly prefer this new code to go into Koha::Report(s) and not the C4 namespace -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 --- Comment #12 from paxed <pasi.kallinen@koha-suomi.fi> --- Splitting this up into multiple parts. One is bug 24695 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24695 CC| |katrin.fischer@bsz-bw.de Keywords|rel_18_11_candidate | Summary|Saved SQL reports code |Saved SQL reports code |improvements |improvements [Omnibus] --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to paxed from comment #12)
Splitting this up into multiple parts. One is bug 24695
Splitting is a good idea - always a bit scared of 'enhancements to...' bugs :) Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24695 [Bug 24695] Improve SQL report validation -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21215 elias.lorgnier@biblibre.com <elias.lorgnier@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |elias.lorgnier@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org