From cf1f99a017a84e867587211088996874ba5ce8c2 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 22 Mar 2020 17:07:57 +0000 Subject: [PATCH] Bug 24476: (QA follow-up) Standardize on 'auto renew(al)' and improve db update There were several versions: auto renew, auto-renew, autorenew I've decided to use auto renew (from automatic renewal) to keep things a bit more consistent. The DB update was missing AFTER and IGNORE for the sys pref. Also fixed a tiny typo (tp > to) Also changed Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- .../atomicupdate/bug_24476_opt_out_of_auto_renewal.perl | 8 ++++---- installer/data/mysql/sysprefs.sql | 2 +- .../prog/en/modules/admin/preferences/patrons.pref | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_24476_opt_out_of_auto_renewal.perl b/installer/data/mysql/atomicupdate/bug_24476_opt_out_of_auto_renewal.perl index c83325f067..151c9b29c3 100644 --- a/installer/data/mysql/atomicupdate/bug_24476_opt_out_of_auto_renewal.perl +++ b/installer/data/mysql/atomicupdate/bug_24476_opt_out_of_auto_renewal.perl @@ -1,16 +1,16 @@ $DBversion = 'XXX'; if( CheckVersion( $DBversion ) ) { unless( column_exists('borrowers','autorenew_checkouts') ){ - $dbh->do( "ALTER TABLE borrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" ); + $dbh->do( "ALTER TABLE borrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1 AFTER anonymized" ); } unless( column_exists('deletedborrowers','autorenew_checkouts') ){ - $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1" ); + $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN autorenew_checkouts TINYINT(1) NOT NULL DEFAULT 1 AFTER anonymized" ); } $dbh->do(q{ - INSERT INTO systempreferences + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES - ('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account tp choose whether their checkouts are auto renewed or not','YesNo') + ('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo') }); SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 24476 - Allow patrons to opt-out of autorenewal)\n"; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 91c553714d..6eeff845d1 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -34,7 +34,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'), ('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'), ('AllowOfflineCirculation','0','','If on, enables HTML5 offline circulation functionality.','YesNo'), -('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account tp choose whether their checkouts are auto renewed or not','YesNo'), +('AllowPatronToControlAutorenewal','0',NULL,'If enabled, patrons will have a field in their account to choose whether their checkouts are auto renewed or not','YesNo'), ('AllowPatronToSetCheckoutsVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set checkouts to be visible to his or her guarantor', 'YesNo'), ('AllowPatronToSetFinesVisibilityForGuarantor', '0', NULL, 'If enabled, the patron can set fines to be visible to his or her guarantor', 'YesNo'), ('AllowPKIAuth','None','None|Common Name|emailAddress','Use the field from a client-side SSL certificate to look a user in the Koha database','Choice'), 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 43d9c2810d..13c2e70352 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 @@ -256,7 +256,7 @@ Patrons: choices: yes: Allow patrons no: Allow only staff - - "to allow/disallow auto-renewal for account. If allowed a patron will be able to update their own account to allow/disallow autorenewals" + - "to allow/disallow auto renewal for account. If allowed a patron will be able to update their own account to allow/disallow auto renewals" Privacy: - diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index e649229d19..f886df0c5e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -52,7 +52,7 @@ [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
[% IF ( borrower.autorenew_checkouts ) %]