Summary: | Parameter public is lost on creating a report | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Reports | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 13578: Make sure the 'public' parameter is passed to the last step
Bug 13578: Make sure the 'public' parameter is passed to the last step [PASSED QA] Bug 13578: Make sure the 'public' parameter is passed to the last step |
Description
Jonathan Druart
2015-01-14 11:02:57 UTC
Created attachment 35181 [details] [review] 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. Created attachment 36152 [details] [review] 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> Been a bit since I've been in the guided reports. This worked, I had memcached (on/off) also tested with Starman (on/off). So good by me. Thanks 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. 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 :) Patch pushed to master. Thanks Jonthan! |