Bugzilla – Attachment 71070 Details for
Bug 20101
Cronjob automatic_item_modification_by_age.pl does not log run in action logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20101: Followup - quiet warns
Bug-20101-Followup---quiet-warns.patch (text/plain), 1.92 KB, created by
Kyle M Hall
on 2018-01-30 17:59:48 UTC
(
hide
)
Description:
Bug 20101: Followup - quiet warns
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2018-01-30 17:59:48 UTC
Size:
1.92 KB
patch
obsolete
>From 5df2b5cb09b7d654fc37a6a276fe5c600fe3a0bc Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 30 Jan 2018 17:49:44 +0000 >Subject: [PATCH] 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> >--- > misc/cronjobs/automatic_item_modification_by_age.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/automatic_item_modification_by_age.pl b/misc/cronjobs/automatic_item_modification_by_age.pl >index aa985cf..578aeb6 100755 >--- a/misc/cronjobs/automatic_item_modification_by_age.pl >+++ b/misc/cronjobs/automatic_item_modification_by_age.pl >@@ -22,7 +22,10 @@ pod2usage(1) if $help; > $verbose = 1 unless $confirm; > > # Load configuration from the syspref >-my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration'); >+C4::Context::clear_syspref_cache; >+my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration') // q{}; >+pod2usage({ -message => 'Set up automatic item modifications by age rules in tools first!', -exitval => 1 }) if $syspref_content !~ /\S/xsm; >+ > my $rules = eval { JSON::from_json( $syspref_content ) }; > pod2usage({ -message => "Unable to load the configuration : $@", -exitval => 1 }) > if $@; >-- >2.10.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20101
:
71064
|
71068
|
71069
|
71070
|
102652
|
102653
|
102809
|
102810
|
103118