From 9188bca7594ecbc1e48cd59f42d961756ca8eebc 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 Signed-off-by: Kelly Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- ...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 0000000000..7f07137ca1 --- /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 ac82de8f52..075e732923 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -226,6 +226,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 1718241578..4031baa4d0 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 @@ -1029,6 +1029,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.39.5