Bug 26831: Add new system preference PurgeListShareInvitesOlderThan

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2fbd03fdc7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Alex Buckley 2022-09-12 11:17:01 +12:00 committed by Fridolin Somers
parent 20ef488a84
commit 3dbe015201
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,12 @@
use Modern::Perl;
return {
bug_number => "26831",
description => "Add new system preference PurgeListShareInvitesOlderThan",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('PurgeListShareInvitesOlderThan', '14', NULL, 'If not empty, number of days used when deleting unaccepted list share invites', 'Integer') });
},
};

View File

@ -601,6 +601,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('Pseudonymization','0',NULL,'If enabled patrons and transactions will be copied in a separate table for statistics purpose','YesNo'),
('PseudonymizationPatronFields','','title,city,state,zipcode,country,branchcode,categorycode,dateenrolled,sex,sort1,sort2','Patron fields to copy to the pseudonymized_transactions table','multiple'),
('PseudonymizationTransactionFields','','datetime,branchcode,transaction_type,itemnumber,itemtype,holdingbranch,location,itemcallnumber,ccode','Transaction fields to copy to the pseudonymized_transactions table','multiple'),
('PurgeListShareInvitesOlderThan', '14', NULL, 'If not empty, number of days used when deleting unaccepted list share invites', 'Integer'),
('PurgeSuggestionsOlderThan', '', NULL, 'If this script is called without the days parameter', 'Integer'),
('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'),
('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'),

View File

@ -640,6 +640,14 @@ OPAC:
1: "Block"
0: "Don't block"
- expired patrons from OPAC actions such as placing a hold or renewing. Note that the setting for a patron category takes priority over this system preference.
-
- The cleanup_database.pl cronjob will automatically delete unaccepted private list share invites after a period of
- pref: PurgeListShareInvitesOlderThan
class: integer
- "days. Example: [14] Sets purgation of unaccepted private list share invites for those older than 14 days."
- "<br><strong>WARNING</strong>: This system preference will be overridden when the cleanup_database.pl cronjob is run with the --list-invites parameter."
- "<br>If neither the --list-invites parameter or this system preference are set then the cronjob will not delete any unaccepted private list share invites."
- "<br><strong>Note:</strong> This system preference requires the <i>misc/cronjobs/cleanup_database.pl</i> cronjob. Ask your system administrator to schedule it."
-
- pref: OpacTrustedCheckout
default: 0