From 7ec8b1785fec47ade3f712ac54727766e83f0777 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Tue, 9 Jul 2024 17:26:17 +0000 Subject: [PATCH] Bug 25733: Add new system preference 'UnresolvedClaimReturnedWarningThreshold' --- .../data/mysql/atomicupdate/bug_25733.pl | 22 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../admin/preferences/circulation.pref | 5 +++++ 3 files changed, 28 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_25733.pl diff --git a/installer/data/mysql/atomicupdate/bug_25733.pl b/installer/data/mysql/atomicupdate/bug_25733.pl new file mode 100755 index 00000000000..d6288ded991 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25733.pl @@ -0,0 +1,22 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "25733", + description => "Adds new system preference UnresolvedClaimReturnedWarningThreshold", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Do you stuffs here + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('UnresolvedClaimReturnedWarningThreshold', '', '', 'Sets the number of unresolved return claims past which the librarian will be warned the patron has many unresolved return claims', 'Integer'); + } + ); + + # sysprefs + say $out "Added new system preference 'UnresolvedClaimReturnedWarningThreshold'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 2bf9d0b6486..73a05b5b80c 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -821,6 +821,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UNIMARCAuthorsFacetsSeparator',', ',NULL,'UNIMARC authors facets separator','short'), ('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'), ('UniqueItemFields','barcode','','Pipe-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table','Free'), +('UnresolvedClaimReturnedWarningThreshold', '', '', 'Sets the number of unresolved return claims past which the librarian will be warned the patron has many unresolved return claims', 'Integer'), ('UnseenRenewals','0','','Allow renewals to be recorded as "unseen" by the library, and count against the patrons unseen renewals limit.','YesNo'), ('UnsubscribeReflectionDelay','',NULL,'Delay for locking unsubscribers', 'Integer'), ('UpdateItemLocationOnCheckin', '', 'NULL', 'This is a list of value pairs.\n Examples:\n\nPROC: FIC - causes an item in the Processing Center location to be updated into the Fiction location on check in.\nFIC: GEN - causes an item in the Fiction location to be updated into the General stacks location on check in.\n_BLANK_:FIC - causes an item that has no location to be updated into the Fiction location on check in.\nFIC: _BLANK_ - causes an item in location FIC to be updated to a blank location on check in.\n_ALL_:FIC - causes all items to be updated into the Fiction location on check in.\nPROC: _PERM_ - causes an item that is in the Processing Center to be updated to it''s permanent location.\n\nGeneral rule: if the location value on the left matches the item''s current location, it will be updated to match the location value on the right.\nNote: PROC and CART are special values, for these locations only can location and permanent_location differ, in all other cases an update will affect both. Items in the CART location will be returned to their permanent location on checkout.\n\nThe special term _BLANK_ may be used on either side of a value pair to update or remove the location from items with no location assigned.\nThe special term _ALL_ is used on the left side of the colon (:) to affect all items.\nThe special term _PERM_ is used on the right side of the colon (:) to return items to their permanent location.', 'Free'), 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 291c6ccec6b..584291ce3c9 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 @@ -1469,6 +1469,11 @@ Circulation: class: integer - days. - This system preference is used by the cleanup_database.pl cronjob. + - + - Warn librarians that a patron has excessive unresolved return claims if the patron has claimed the return of more than + - pref: UnresolvedClaimReturnedWarningThreshold + class: integer + - items. Recalls: - -- 2.39.5