Bug 14735

Summary: cache_expiry is not saved when updating a SQL report
Product: Koha Reporter: Jesse Weaver <jweaver>
Component: ReportsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: f.demians, gwilliams, jonathan.druart, katrin.fischer, liz, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14735: Save cache_expiry on modifying a report
Bug 14735: Save cache_expiry on modifying a report
Bug 14735: Save cache_expiry on modifying a report

Description Jesse Weaver 2015-08-26 17:29:21 UTC
Steps to duplicate (must have memcached enabled):

1. Create and save a report using the default values for "Report is public" and cache time.
2. Run the report.
3. Edit the report changing the setting for "Report is public" to yes.
4. Save the report. The cache time is now 0.
5. Edit the report changing the cache time to 300.
6. Save the report. The cache time is now 0 again.

This seems to be due to the fact that cache_expiry is not passed to the update_sql function in the phase 'Update SQL'.
Comment 1 Katrin Fischer 2015-11-01 19:48:23 UTC
Data is lost.. upgrading severity.
Comment 2 Jonathan Druart 2015-11-10 15:18:45 UTC Comment hidden (obsolete)
Comment 3 Frédéric Demians 2015-11-10 17:25:34 UTC Comment hidden (obsolete)
Comment 4 Tomás Cohen Arazi 2015-11-10 18:22:36 UTC
Created attachment 44719 [details] [review]
Bug 14735: Save cache_expiry on modifying a report

The cache_expiry is not saved when updating a SQL report.

Test plan:
0/ Enable memcached
1/ Create a sql report
2/ Edit it and change the cache expiry value
3/ Edit again
=> The value should have been updated.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Repeatable bug. Solved with this patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi 2015-11-10 18:25:39 UTC
Patch pushed to master.

Enjoy your beer Jonathan!
Comment 6 Frédéric Demians 2015-11-29 20:52:07 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 7 Liz Rea 2016-01-06 21:04:51 UTC
Pushed to 3.18.13, and released.