Bugzilla – Attachment 17393 Details for
Bug 8337
System preferences for longoverdue cron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8337 System preferences for longoverdue cron
Bug-8337-System-preferences-for-longoverdue-cron.patch (text/plain), 3.71 KB, created by
Kyle M Hall (khall)
on 2013-04-12 15:03:10 UTC
(
hide
)
Description:
Bug 8337 System preferences for longoverdue cron
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-04-12 15:03:10 UTC
Size:
3.71 KB
patch
obsolete
>From 91e5fcb2b82413e896e48564d5eee83763149ee3 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick?= <frederick.capovilla@libeo.com> >Date: Thu, 21 Mar 2013 17:51:46 -0400 >Subject: [PATCH] Bug 8337 System preferences for longoverdue cron > >Patch to follow that adds 3 new system preferences to control the parameters for the longoverdue script. >New prefs are DefaultLongOverdueChargeValue, DefaultLongOverdueLostValue and DefaultLongOverdueDays. >These preferences are used when you call the longoverdue.pl script without their parameters. > >Sponsored-By: CCSR >Signed-off-by: Leila and Fridos help <koha.aixmarseille@gmail.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../en/modules/admin/preferences/circulation.pref | 17 +++++++++++++++++ > misc/cronjobs/longoverdue.pl | 17 +++++++++++++++-- > 2 files changed, 32 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index f88d964..c549bf8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -298,6 +298,23 @@ Circulation: > confirmation: Ask for confirmation > - when checking out to a borrower that has overdues outstanding > - >+ - By default, set the LOST value of an item to >+ - pref: DefaultLongOverdueLostValue >+ class: integer >+ - when the item has been overdue for more than >+ - pref: DefaultLongOverdueDays >+ class: integer >+ - days. >+ - <br>WARNING รข These preferences will activate the automatic item loss process. Leave these fields empty if you don't want to activate this feature. >+ - "<br>Example: [1] [30] Sets an item to the LOST value 1 when it has been overdue for more than 30 days." >+ - <br>(Used when the longoverdue.pl script is called without the --lost parameter) >+ - >+ - "Charge a lost item to the borrower's account when the LOST value of the item changes to :" >+ - pref: DefaultLongOverdueChargeValue >+ class: integer >+ - <br>Leave this field empty if you don't want to charge the user for lost items. >+ - <br>(Used when the longoverdue.pl script is called without the --charge parameter) >+ - > - On checkin route the returned item to > - pref: HomeOrHoldingBranchReturn > type: choice >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 159db51..22fa33f 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -108,8 +108,21 @@ ENDUSAGE > # FIXME: allow --help or -h > # > if ( ! defined($lost) ) { >- print $usage; >- die "ERROR: No --lost (-l) option defined"; >+ my $longoverdue_value = C4::Context->preference('DefaultLongOverdueLostValue'); >+ my $longoverdue_days = C4::Context->preference('DefaultLongOverdueDays'); >+ if(defined($longoverdue_value) and defined($longoverdue_days) and $longoverdue_value ne '' and $longoverdue_days ne '' and $longoverdue_days >= 0) { >+ $lost->{$longoverdue_days} = $longoverdue_value; >+ } >+ else { >+ print $usage; >+ die "ERROR: No --lost (-l) option defined"; >+ } >+} >+if ( ! defined($charge) ) { >+ my $charge_value = C4::Context->preference('DefaultLongOverdueChargeValue'); >+ if(defined($charge_value) and $charge_value ne '') { >+ $charge = $charge_value; >+ } > } > unless ($confirm) { > $verbose = 1; # If you're not running it for real, then the whole point is the print output. >-- >1.7.2.5
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 8337
:
10569
|
11389
|
16687
|
16810
|
17393
|
30639
|
30944
|
32288
|
32289
|
32290
|
32291
|
32292
|
33802