I'm on master. I paste this to create an sql report. select count(*) as circs from statistics where type in ('issue','localuse') and datetime between <<Circed between (yyyy-mm-dd)>> and <<and (yyyy-mm-dd)>> It appears to save. I click 'Run Report' at the top and get this: Software error: execute_query failed to return sth for report : at /home/nengard/kohaclone/reports/guided_reports.pl line 602. For help, please send mail to the webmaster (webmaster@debian), giving this error message and the time and date of the error. When I go back the report did not save.
The reports aren't getting saved: guided_reports.pl: DBD::mysql::db do failed: Column 'cache_expiry' cannot be null at /home/koha/kohaclone/C4/Reports/Guided.pm line 480., referer: http://kohadev:8080/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL
Created attachment 9648 [details] [review] Bug 8128 - can't seem to run new sql reports Reports cannot be saved because saved_sql.cache_expiry cannot be null. Fixed by setting default to 0 if a cache_expiry value is not passed into the function.
Created attachment 9649 [details] [review] [SIGNED-OFF] Bug 8128 - can't seem to run new sql reports Reports cannot be saved because saved_sql.cache_expiry cannot be null. Fixed by setting default to 0 if a cache_expiry value is not passed into the function. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Created attachment 9650 [details] [review] Bug 8128 - can't seem to run new sql reports Reports cannot be saved because saved_sql.cache_expiry cannot be null. Fixed by setting default to 0 if a cache_expiry value is not passed into the function. Signed-off-by: Liz Rea <wizzyrea@gmail.com> passes t xt Verified original bug, patch resolves issue.
I think this is related to: Bug 7248 - Caching for services Bug 7249 - Report webservices The latter got pushed, but the former has gone through some iterations.
(In reply to comment #5) > I think this is related to: > > Bug 7248 - Caching for services > Bug 7249 - Report webservices > > The latter got pushed, but the former has gone through some iterations. They've both been pushed, but somewhere in the process the database update got changed. Kyle came up with a fix that doesn't require a database update, which is what Nicole and Liz signed off on.
Ah, sorry, I was a bit too quick there...
Hi Kyle, Why do you initialize the cache expiry with 0 whereas the field in DB have a default value = 300 ?
Created attachment 9698 [details] [review] Bug 8128 - Followup - Change default value for cache_expiry Change default value for cache_expiry from 0 to 300.
(In reply to comment #8) > Hi Kyle, > Why do you initialize the cache expiry with 0 whereas the field in DB have a > default value = 300 ? I was not aware of the default. I've submitted a followup to fix this. Thanks!
Created attachment 9736 [details] [review] Bug 8128 - [SIGNED-OFF]Followup - Change default value for cache_expiry Change default value for cache_expiry from 0 to 300. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Adds a default value for an otherwise-possibly-NULL field. marking as Passed QA.