[Bug 24614] New: Can't edit reports if not using cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Bug ID: 24614 Summary: Can't edit reports if not using cache Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To test: Enable strict mode Disable/stop memcached Create a report (note you don't see the cache expiry option) Try to edit the report It fails Enable memcached You get the cache expiry option back You can edit -- 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=24614 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=24614 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 98714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98714&action=edit Bug 24614: Add tests -- 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=24614 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 98715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98715&action=edit Bug 24614: Use Koha::Reports from save_report and update_sql In order to get the default value defined at DBMS level, we use Koha::Reports (to inherit from Koha::Object->store) from the 2 add/edit methods of C4::Reports::Guided. A second step would be to remove completely those CRUD subroutines and use directly Koha::Reports instead. Test plan: 1. Add and edit some reports 2. Disable memcached, create a report, edit it => Should not crash 3. Make sure the tests make sense and that they pass after the second patch. The error was: DBD::mysql::db do failed: Column 'cache_expiry' cannot be null [for Statement "UPDATE saved_sql SET savedsql = ?, last_modified = now(), report_name = ?, report_group = ?, report_subgroup = ?, notes = ?, cache_expiry = ?, public = ? WHERE id = ? "] at /kohadevbox/koha/C4/Reports/Guided.pm line 633. -- 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=24614 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.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=24614 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98714|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 101700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101700&action=edit Bug 24614: Add tests 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=24614 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98715|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 101701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101701&action=edit Bug 24614: Use Koha::Reports from save_report and update_sql In order to get the default value defined at DBMS level, we use Koha::Reports (to inherit from Koha::Object->store) from the 2 add/edit methods of C4::Reports::Guided. A second step would be to remove completely those CRUD subroutines and use directly Koha::Reports instead. Test plan: 1. Add and edit some reports 2. Disable memcached, create a report, edit it => Should not crash 3. Make sure the tests make sense and that they pass after the second patch. The error was: DBD::mysql::db do failed: Column 'cache_expiry' cannot be null [for Statement "UPDATE saved_sql SET savedsql = ?, last_modified = now(), report_name = ?, report_group = ?, report_subgroup = ?, notes = ?, cache_expiry = ?, public = ? WHERE id = ? "] at /kohadevbox/koha/C4/Reports/Guided.pm line 633. 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=24614 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Needs Signoff |Signed Off --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Does the trick, Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | Assignee|jonathan.druart@bugs.koha-c |kyle@bywatersolutions.com |ommunity.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Kyle M Hall <kyle@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=24614 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101700|0 |1 is obsolete| | Attachment #101701|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 101764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101764&action=edit Bug 24614: Add tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=24614 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 101765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101765&action=edit Bug 24614: Use Koha::Reports from save_report and update_sql In order to get the default value defined at DBMS level, we use Koha::Reports (to inherit from Koha::Object->store) from the 2 add/edit methods of C4::Reports::Guided. A second step would be to remove completely those CRUD subroutines and use directly Koha::Reports instead. Test plan: 1. Add and edit some reports 2. Disable memcached, create a report, edit it => Should not crash 3. Make sure the tests make sense and that they pass after the second patch. The error was: DBD::mysql::db do failed: Column 'cache_expiry' cannot be null [for Statement "UPDATE saved_sql SET savedsql = ?, last_modified = now(), report_name = ?, report_group = ?, report_subgroup = ?, notes = ?, cache_expiry = ?, public = ? WHERE id = ? "] at /kohadevbox/koha/C4/Reports/Guided.pm line 633. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=24614 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle@bywatersolutions.com |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.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=24614 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Devinim <kohadevinim@devinim.com.tr> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25000 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25000 [Bug 25000] SQL report not updated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|25000 | Blocks| |25000 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25000 [Bug 25000] SQL report not updated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 102013 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102013&action=edit Bug 24614: Fix Reports/Guided.t DBD::mysql::st execute failed: Column 'public' cannot be null [for Statement "UPDATE `saved_sql` SET `last_modified` = ?, `notes` = ?, `public` = ?, `report_group` = ?, `report_name` = ?, `report_subgroup` = ?, `savedsql` = ? WHERE ( `id` = ? )" with ParamValues: 0='2020-03-27T16:03:04', 1=undef, 2=undef, 3=undef, 4='Just another report', 5=undef, 6=undef, 7=25] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. # Looks like you planned 17 tests but ran 6. update_sql expect all the paramters to be set, otherwise it will be nulled. The best way to fix it is at test level. There is only 1 occurrence in controller/module, and it sends all the parameters. That is the correct way to do and will make things easier when we will removed them to use Koha::Reports directly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00 |20.05.00, 19.11.05 released in| | Status|Pushed to master |Pushed to stable CC| |joy@bywatersolutions.com --- Comment #10 from Joy Nelson <joy@bywatersolutions.com> --- backported to 19.11.x for 19.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|20.05.00, 19.11.05 |20.05.00, 19.11.05, released in| |19.05.10 --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24614 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hayleymapley@catalyst.net.n | |z --- Comment #12 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Normal patch will not be backported to 18.11.x series -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org