From b345282235b5be76dc5209f3d744c9b74e4bddcd Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 26 Oct 2023 02:02:12 +0000 Subject: [PATCH] Bug 17617: EmailPatronWhenHoldIsPlaced system preference --- ...ug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/circulation.pref | 6 ++++++ 3 files changed, 23 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl diff --git a/installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl b/installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl new file mode 100755 index 00000000000..7f07137ca1f --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "17617", + description => "Notify patron when their hold has been placed", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('EmailPatronWhenHoldIsPlaced', '0', NULL, 'Email patron when a hold has been placed for them', 'YesNo') } + ); + + say $out "Added system preference 'EmailPatronWhenHoldIsPlaced'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 314efd51a80..cdc9bad412e 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -223,6 +223,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'), ('EmailOverduesNoEmail','1',NULL,'Send send overdues of patrons without email address to staff','YesNo'), ('EmailPatronRegistrations', '0', '0|EmailAddressForPatronRegistrations|BranchEmailAddress|KohaAdminEmailAddress', 'Choose email address that new patron registrations will be sent to: ', 'Choice'), +('EmailPatronWhenHoldIsPlaced', '0', NULL, 'Email patron when a hold has been placed for them', 'YesNo'), ('EmailPurchaseSuggestions','0','0|EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that new purchase suggestions will be sent to: ','Choice'), ('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'), ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'), 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 5cb207d3f0e..5e6b5c3cba0 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 @@ -1013,6 +1013,12 @@ Circulation: 1: block 0: allow - renewing of items from the staff interface and via the misc/cronjobs/automatic_renewals.pl cronjob. + - + - pref: EmailPatronWhenHoldIsPlaced + choices: + 1: Email + 0: "Don't email" + - a patron when they have placed a hold. Fines Policy: - - pref: finesCalendar -- 2.30.2