Bug 13445 - Clean up options for scheduled reports, remove URL, add HTML and Text/TSV
Summary: Clean up options for scheduled reports, remove URL, add HTML and Text/TSV
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Eric Phetteplace
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-12 10:12 UTC by Martin Renvoize
Modified: 2018-04-24 19:21 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
patch (1.63 KB, patch)
2018-04-06 21:41 UTC, Eric Phetteplace
Details | Diff | Splinter Review
Bug 13445 - Scheduled Report, Type=URL fails (1.69 KB, patch)
2018-04-10 18:46 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 13445 - Scheduled Report, Type=URL fails (1.74 KB, patch)
2018-04-13 18:35 UTC, Maksim Sen
Details | Diff | Splinter Review
Bug 13445: Remove URL option from scheduled reports, add Text option (1.82 KB, patch)
2018-04-22 10:30 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 Martin Renvoize 2014-12-12 10:12:35 UTC
It seems when you select 'URL' as type when scheduling a report from the staff client, that the resulting email is blank.

To test, 

1) Navigate to: Home › Reports › Guided reports wizard › Saved reports
2) Select for any saved report: Actions › Schedule
3) Scheduled a report to run 'soon'
4) Select 'URL' as the 'Output format'
5) Enter your email address and wait for the resulting email

The resulting email will be 'bodyless', i.e. empty
Comment 1 Martin Renvoize 2014-12-12 10:14:02 UTC
Looking at the runreports.pl script that this instantiates, it looks like the URL type handling was commented out some time ago. I'm not sure if this feature is ever used/likely to be used. Perhaps the solution is to just tidy up a bit.. remove the commented code in runreport.pl and drop the URL option in the staff client... thoughts?
Comment 2 Katrin Fischer 2015-05-15 06:04:49 UTC
Offering options/features that don't work is never a good thing - removing it from the GUI would be good in my opinion.

I can imagine maybe the reason was not to send out patron information by email, but offer a link to access it instead?
Comment 3 Eric Phetteplace 2016-08-31 22:46:51 UTC
I agree strongly with Katrin that it's a bad idea to leave broken features in the UI. This doesn't work as advertised and should be removed.

I'm perfectly willing to write a patch and removes the <select> from the scheduler.tt template, replacing it with a hidden input, and the corresponding help text in corresponding template as well if people are agreed that that's the best course of action. While this may be a useful feature I think it's better to remove the broken appendage of it first and add back if/when it's fully complete.

It's also already possible to construct a link that goes to the results of a particular report. One could create a calendar reminder in some external application that handles this use case easily.
Comment 4 Eric Phetteplace 2018-04-06 21:41:48 UTC
Created attachment 73804 [details] [review]
patch
Comment 5 Eric Phetteplace 2018-04-06 21:45:34 UTC
I wrote a patch that removes "URL" and adds CSV & HTML options to the "format" list. I tested and both of the new format options work just fine even though they weren't listed previously; I found them by looking at misc/cronjobs/runreport.pl which is the script invoked by the task scheduler.
Comment 6 M. Tompsett 2018-04-10 18:34:47 UTC
(In reply to Eric Phetteplace from comment #5)
> I wrote a patch that removes "URL" and adds CSV & HTML options to the
> "format" list. I tested and both of the new format options work just fine
> even though they weren't listed previously; I found them by looking at
> misc/cronjobs/runreport.pl which is the script invoked by the task scheduler.

I have confirmed there are 4 valid values, but tsv and text are identical in the runreport.pl script. It really isn't removing URL as much as it is correcting the name to HTML, I believe. This looks good. Just about to test...
Comment 7 M. Tompsett 2018-04-10 18:46:58 UTC
Created attachment 73962 [details] [review]
Bug 13445 - Scheduled Report, Type=URL fails

Remove the non-functional 'URL' format
Offer the (functional) CSV & HTML formats

testing plan:
- visit the task scheduler tool at cgi-bin/koha/tools/scheduler.pl
- 'Output format' select list should offer Text (TSV), CSV, & HTML
- scheduled reports for each of the above types should run & send emails correctly

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 8 Maksim Sen 2018-04-13 18:35:38 UTC
Created attachment 74177 [details] [review]
Bug 13445 - Scheduled Report, Type=URL fails

Remove the non-functional 'URL' format
Offer the (functional) CSV & HTML formats

testing plan:
- visit the task scheduler tool at cgi-bin/koha/tools/scheduler.pl
- 'Output format' select list should offer Text (TSV), CSV, & HTML
- scheduled reports for each of the above types should run & send emails correctly

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>
Comment 9 Katrin Fischer 2018-04-22 10:30:50 UTC
Created attachment 74693 [details] [review]
Bug 13445: Remove URL option from scheduled reports, add Text option

Remove the non-functional 'URL' format
Offer the (functional) CSV & HTML formats

testing plan:
- visit the task scheduler tool at cgi-bin/koha/tools/scheduler.pl
- 'Output format' select list should offer Text (TSV), CSV, & HTML
- scheduled reports for each of the above types should run & send emails correctly

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Maksim Sen <maksim.sen@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2018-04-22 10:32:15 UTC
Eric, I notice that your author line in the patch reads:
phette23 <phette23@gmail.com>

Do you want to fix it to have your name? It will be listed in the release notes then. I can do it for you if you want to.
Comment 11 Jonathan Druart 2018-04-23 17:28:53 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 12 Eric Phetteplace 2018-04-24 16:46:25 UTC
(In reply to Katrin Fischer from comment #10)
> Eric, I notice that your author line in the patch reads:
> phette23 <phette23@gmail.com>
> 
> Do you want to fix it to have your name? It will be listed in the release
> notes then. I can do it for you if you want to.

I actually prefer my phette23 handle, but thank you for offering.
Comment 13 Katrin Fischer 2018-04-24 19:21:45 UTC
That's good, because pushed :)