Bug 14735 - cache_expiry is not saved when updating a SQL report
Summary: cache_expiry is not saved when updating a SQL report
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-26 17:29 UTC by Jesse Weaver
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

See Also:
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 (1020 bytes, patch)
2015-11-10 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14735: Save cache_expiry on modifying a report (1.09 KB, patch)
2015-11-10 17:25 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 14735: Save cache_expiry on modifying a report (1.14 KB, patch)
2015-11-10 18:22 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.