C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl.
Created attachment 71064 [details] [review] Bug 20101 - Cronjob automatic_item_modification_by_age.pl does not log run in action logs C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl. Test Plan: 1) Apply this patch 2) Enable CronjobLog 3) Run automatic_item_modification_by_age.pl succesfully 4) Note the run is noted in the action logs
Created attachment 71068 [details] [review] Bug 20101 - Cronjob automatic_item_modification_by_age.pl does not log run in action logs C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl. Test Plan: 1) Apply this patch 2) Enable CronjobLog 3) Run automatic_item_modification_by_age.pl succesfully 4) Note the run is noted in the action logs NOTE: Create rule in tools! Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 71069 [details] [review] Bug 20101: Followup - quiet warns If the user has never run the tools, the system preference won't exist, the JSON will be empty, and warns will trigger. TEST PLAN --------- 1) back up systempreferences and log files as desired. 2) in sql client: S> delete from systempreferences where variable='automatic_item_modification_by_age_configuration'; S> quit 3) run the following commands on a kohadevbox: echo | sudo tee /var/log/koha/kohadev/plack-error.log restart_all 4) test the first patch 5) cat /var/log/koha/kohadev/plack-error.log -- notice there is a nasty warn 6) apply this patch 7) repeat steps 3-5 -- this time no nasty warns 8) run koha qa test tools
Created attachment 71070 [details] [review] Bug 20101: Followup - quiet warns If the user has never run the tools, the system preference won't exist, the JSON will be empty, and warns will trigger. TEST PLAN --------- 1) back up systempreferences and log files as desired. 2) in sql client: S> delete from systempreferences where variable='automatic_item_modification_by_age_configuration'; S> quit 3) run the following commands on a kohadevbox: echo | sudo tee /var/log/koha/kohadev/plack-error.log restart_all 4) test the first patch 5) cat /var/log/koha/kohadev/plack-error.log -- notice there is a nasty warn 6) apply this patch 7) repeat steps 3-5 -- this time no nasty warns 8) run koha qa test tools Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
*** Bug 20095 has been marked as a duplicate of this bug. ***
Looking at the logs the interface is shown as 'opac', should this not be command-line? Otherwise patches work ok, but please fix the patch subjects to match: https://wiki.koha-community.org/wiki/Commit_messages
Created attachment 102652 [details] [review] Bug 20101: Cronjob automatic_item_modification_by_age.pl does not log run in action logs C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl. Test Plan: 1) Apply this patch 2) Enable CronjobLog 3) Run automatic_item_modification_by_age.pl succesfully 4) Note the run is noted in the action logs Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 102653 [details] [review] Bug 20101: Followup - quiet warns If the user has never run the tools, the system preference won't exist, the JSON will be empty, and warns will trigger. TEST PLAN --------- 1) back up systempreferences and log files as desired. 2) in sql client: S> delete from systempreferences where variable='automatic_item_modification_by_age_configuration'; S> quit 3) run the following commands on a kohadevbox: echo | sudo tee /var/log/koha/kohadev/plack-error.log restart_all 4) test the first patch 5) cat /var/log/koha/kohadev/plack-error.log -- notice there is a nasty warn 6) apply this patch 7) repeat steps 3-5 -- this time no nasty warns 8) run koha qa test tools Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(In reply to Katrin Fischer from comment #6) > Looking at the logs the interface is shown as 'opac', should this not be > command-line? The interface is labeled as 'cron' in my testing, and is not modified by this patch.
C4::Context::clear_syspref_cache; I think there should be no need to do such thing here.
* Commit title does not contain 'follow-up' correctly spelt - ef873f25fb
Created attachment 102809 [details] [review] Bug 20101: Follow-up - quiet warns If the user has never run the tools, the system preference won't exist, the JSON will be empty, and warns will trigger. TEST PLAN --------- 1) back up systempreferences and log files as desired. 2) in sql client: S> delete from systempreferences where variable='automatic_item_modification_by_age_configuration'; S> quit 3) run the following commands on a kohadevbox: echo | sudo tee /var/log/koha/kohadev/plack-error.log restart_all 4) test the first patch 5) cat /var/log/koha/kohadev/plack-error.log -- notice there is a nasty warn 6) apply this patch 7) repeat steps 3-5 -- this time no nasty warns 8) run koha qa test tools Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 102810 [details] [review] Bug 20101: Follow-up - No need to clear syspref cache
IMO the 2 follow-ups do not belong to this bug report. I would obsolete them, then PQA/push that first patch that waited for too long already.
Created attachment 103118 [details] [review] Bug 20101: Cronjob automatic_item_modification_by_age.pl does not log run in action logs C4::Log::cronlogaction() was never implemented in automatic_item_modification_by_age.pl. Test Plan: 1) Apply this patch 2) Enable CronjobLog 3) Run automatic_item_modification_by_age.pl succesfully 4) Note the run is noted in the action logs Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Jonathan Druart from comment #14) > IMO the 2 follow-ups do not belong to this bug report. I would obsolete > them, then PQA/push that first patch that waited for too long already. Agreed
This sort of feels like something that could move into the Koha::Script base class at some point.. however not here.
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.06
backported to 19.05.x for 19.05.11