Bug 16280

Summary: purge_suggestions.pl: Cron job log should tell number of days used
Product: Koha Reporter: Marc Véron <veron>
Component: Staff interfaceAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 13287    
Bug Blocks:    
Attachments: Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used

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.