Bug 13578 - Parameter public is lost on creating a report
Summary: Parameter public is lost on creating a report
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-14 11:02 UTC by Jonathan Druart
Modified: 2015-12-03 22:11 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13578: Make sure the 'public' parameter is passed to the last step (4.60 KB, patch)
2015-01-14 11:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13578: Make sure the 'public' parameter is passed to the last step (4.67 KB, patch)
2015-02-25 05:04 UTC, Brendan Gallagher
Details | Diff | Splinter Review
[PASSED QA] Bug 13578: Make sure the 'public' parameter is passed to the last step (4.75 KB, patch)
2015-03-03 10:32 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2015-01-14 11:02:57 UTC
With no caching system, it's not possible to create a public report.
Comment 1 Jonathan Druart 2015-01-14 11:12:14 UTC Comment hidden (obsolete)
Comment 2 Brendan Gallagher 2015-02-25 05:04:42 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-03-03 10:32:39 UTC
Created attachment 36379 [details] [review]
[PASSED QA] Bug 13578: Make sure the 'public' parameter is passed to the last step

If no caching system is up ($usecache == 0), the public parameter is
lost on the step 3.
The hash passed to the template looks like:
   'cache_expiry', 300,
   'cache_expiry_units',
   'public', 1
So the template receives cache_expiry = 300, cache_expiry_units =
'public' and 1 = undef.

This patch fixes the problem passing the cache_expiry* parameters only
if the usecache is set.

Test plan:
0/ Disable any caching system
1/ Create a new public report and go up to the 6th step, save the report
and verify the report is created as public
2/ Enable a caching system
2/ Create a public report with a cache expiry value, save it and verify
the report is created as public and the cache expiry value is correct.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
Comment 4 Katrin Fischer 2015-03-03 10:33:51 UTC
This works nicely, but wondering why we put the public switch on the first step instead of on the last step when saving the report? Then the forms to create an SQL report and to save a guided report would be more similar. Not a blocker at all as this is a bug fix, just got me a little confused :)
Comment 5 Tomás Cohen Arazi 2015-03-11 18:20:05 UTC
Patch pushed to master.

Thanks Jonthan!