Bug 16280 - purge_suggestions.pl: Cron job log should tell number of days used
Summary: purge_suggestions.pl: Cron job log should tell number of days used
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on: 13287
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-17 16:46 UTC by Marc Véron
Modified: 2019-10-14 19:58 UTC (History)
4 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 16280: purge_suggestions.pl: Cron job log should tell number of days used (1.19 KB, patch)
2016-04-17 16:57 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used (1.41 KB, patch)
2018-10-16 17:45 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used (1.48 KB, patch)
2018-10-17 16:36 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2016-04-17 16:46:47 UTC
To reproduce (on top of Bug 13287)

- Set syspref CronjobLog to "Log"
- Set syspref PurgeSuggestionsOlderThan to 20

- From console, run misc/cronjobs/purge_suggestions.pl
- Check entry in cgi-bin/koha/admin/preferences.pl?op=search&searchfield=log
Result in log:
 	misc/cronjobs/purge_suggestions.pl 
Expected: indication that value of 20 days was used

- From console, run misc/cronjobs/purge_suggestions.pl -days 100
Result in log:
 	misc/cronjobs/purge_suggestions.pl 
Expected: indication that value of 100 days was used
Comment 1 Marc Véron 2016-04-17 16:57:43 UTC
Created attachment 50298 [details] [review]
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used

To test:
- Apply patch
- Set syspref CronjobLog to "Log"
- Set syspref PurgeSuggestionsOlderThan e.g. to 20
- From console, run misc/cronjobs/purge_suggestions.pl
- Check entry in cgi-bin/koha/admin/preferences.pl?op=search&searchfield=log
- Verify that log entry contains number of days (20, same as in syspref)
- From console, run misc/cronjobs/purge_suggestions.pl -days 100
- Verify that log entry contains number of days (100, same as in param -days)
Comment 2 Marc Véron 2016-06-14 09:31:16 UTC
Is blocked by Bug 13287 (Failed QA)
Comment 3 Mark Tompsett 2018-10-16 17:45:27 UTC
Created attachment 80669 [details] [review]
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used

To test:
- Apply patch
- Set syspref CronjobLog to "Log"
- Set syspref PurgeSuggestionsOlderThan e.g. to 20
- From console, run misc/cronjobs/purge_suggestions.pl
- Check entry in cgi-bin/koha/admin/preferences.pl?op=search&searchfield=log
- Verify that log entry contains number of days (20, same as in syspref)
- From console, run misc/cronjobs/purge_suggestions.pl -days 100
- Verify that log entry contains number of days (100, same as in param -days)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 4 Jonathan Druart 2018-10-17 16:36:38 UTC
Created attachment 80739 [details] [review]
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used

To test:
- Apply patch
- Set syspref CronjobLog to "Log"
- Set syspref PurgeSuggestionsOlderThan e.g. to 20
- From console, run misc/cronjobs/purge_suggestions.pl
- Check entry in cgi-bin/koha/admin/preferences.pl?op=search&searchfield=log
- Verify that log entry contains number of days (20, same as in syspref)
- From console, run misc/cronjobs/purge_suggestions.pl -days 100
- Verify that log entry contains number of days (100, same as in param -days)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Nick Clemens (kidclamp) 2018-11-05 14:58:09 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize 2018-11-16 12:23:34 UTC
Enhancement, will not be backported to 18.05.x series.