From df0f16de496813dfbb3dfb9f91a07bc93ceecf6c Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 20 Sep 2018 12:48:10 +0200 Subject: [PATCH] Bug 21336: Dbrev for new prefs Content-Type: text/plain; charset=utf-8 This patch adds three new prefs: - UnsubscribeReflectionDelay - PatronAnonymizeDelay - PatronRemovalDelay Test plan: Run upgrade. Check patrons pref page. Look under Privacy. Signed-off-by: Marcel de Rooy --- installer/data/mysql/atomicupdate/bug_21336b.perl | 12 ++++++++++++ installer/data/mysql/sysprefs.sql | 3 +++ .../prog/en/modules/admin/preferences/patrons.pref | 8 ++++++++ 3 files changed, 23 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_21336b.perl diff --git a/installer/data/mysql/atomicupdate/bug_21336b.perl b/installer/data/mysql/atomicupdate/bug_21336b.perl new file mode 100644 index 0000000..926f54e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_21336b.perl @@ -0,0 +1,12 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| +INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) +VALUES +('UnsubscribeReflectionDelay','',NULL,'Delay for locking unsubscribers', 'Integer'), +('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'), +('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer') + |); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 21336 - Add preferences)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index bc7af05..5895e6c 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -423,7 +423,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OverdueNoticeCalendar',0,NULL,'Take the calendar into consideration when generating overdue notices','YesNo'), ('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'), ('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'), +('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'), ('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'), +('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'), ('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'), ('PatronSelfRegistration','0',NULL,'If enabled, patrons will be able to register themselves via the OPAC.','YesNo'), ('PatronSelfRegistrationAdditionalInstructions','','','A free text field to display additional instructions to newly self registered patrons.','free'), @@ -580,6 +582,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'), ('UpdateItemWhenLostFromHoldList','',NULL,'This is a list of values to update an item when it is marked as lost from the holds to pull screen','Free'), ('UniqueItemFields','barcode','','Space-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'), +('UnsubscribeReflectionDelay','',NULL,'Delay for locking unsubscribers', 'Integer'), ('UpdateNotForLoanStatusOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free'), ('UpdateTotalIssuesOnCirc','0',NULL,'Whether to update the totalissues field in the biblio on each circ.','YesNo'), ('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 8c8227d4..9fbe4e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -226,3 +226,11 @@ Patrons: Enforced: 'Enforced' Permissive: 'Permissive' - "GDPR is the EU General Data Protection Regulation. When you enforce, patrons need to give consent before using the OPAC. If you set to permissive, Koha will warn but not enforce." + - + - Lock/expire patrons that submitted an unsubscribe request (refused consent) after + - pref: UnsubscribeReflectionDelay + - days, anonymize locked/expired accounts after + - pref: PatronAnonymizeDelay + - days and remove anonymized patron accounts after + - pref: PatronRemovalDelay + - days.
IMPORTANT: No action is performed when these delays are empty (no text). But a zero value ('0') is interpreted as no delay (do it now)! The actions are performed by the cleanup database cron job. -- 2.1.4