Description
Katrin Fischer
2016-09-26 05:18:40 UTC
One should have the option to specify the number of results to keep (for example keep two on a report scheduled to run daily, as well as the option to delete saved results - perhaps with a "select all" when viewing saved results for a particular report. I do get requests from libraries to "clean this up". It does interfere with usability. +1 on this. It'd be good to have a way to delete these manually from the staff interface and also a way to set cleanup_database to do so. Created attachment 144116 [details] [review] Bug 17350: Purge old saved reports via cleanup_database To test: apply patch 1 - have or create a report 2 - run your report via the command line with --store-results. Do this twice. 3 - update the saved_reports table to set date_run for one of your two saved results set to a datetime more than 5 days ago 4 - perl misc/cronjobs/cleanup_database.pl --reports 5 --verbose --confirm 5 - Koha tells you its deleting saved reports data from more than 5 days ago 6 - confirm in the database and the staff interface that it's done so I *think* I managed to write a patch to add this functionality to cleanup_databse. I've filed bug 32311 to add a way to delete these from the staff interface. Created attachment 145721 [details] [review] Bug 17350: Purge old saved reports via cleanup_database To test: apply patch 1 - have or create a report 2 - run your report via the command line with --store-results. Do this twice. 3 - update the saved_reports table to set date_run for one of your two saved results set to a datetime more than 5 days ago 4 - perl misc/cronjobs/cleanup_database.pl --reports 5 --verbose --confirm 5 - Koha tells you its deleting saved reports data from more than 5 days ago 6 - confirm in the database and the staff interface that it's done so Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 145722 [details] [review] Bug 17350: Add note about how the saved reports data is created in first place This amends the documentation of the cleanup_database.pl script to include a hint for how the saved reports data is created. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 147414 [details] [review] Bug 17350: Purge old saved reports via cleanup_database To test: apply patch 1 - have or create a report 2 - run your report via the command line with --store-results. Do this twice. 3 - update the saved_reports table to set date_run for one of your two saved results set to a datetime more than 5 days ago 4 - perl misc/cronjobs/cleanup_database.pl --reports 5 --verbose --confirm 5 - Koha tells you its deleting saved reports data from more than 5 days ago 6 - confirm in the database and the staff interface that it's done so Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 147415 [details] [review] Bug 17350: Add note about how the saved reports data is created in first place This amends the documentation of the cleanup_database.pl script to include a hint for how the saved reports data is created. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Works, QA script happy, code looks good, passing QA :) Pushed to master for 23.05. Nice work everyone, thanks! |