Bugzilla – Attachment 163725 Details for
Bug 35973
System preference RedirectGuaranteeEmail has incorrect values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference
Bug-35973-Correct-wrong-values-for-RedirectGuarant.patch (text/plain), 2.82 KB, created by
David Nind
on 2024-03-22 17:28:13 UTC
(
hide
)
Description:
Bug 35973: Correct wrong values for RedirectGuaranteeEmail system preference
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-03-22 17:28:13 UTC
Size:
2.82 KB
patch
obsolete
>From 87b3842dc03a640c9e6b71f93b8809218a3f454d Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 17 Mar 2024 16:46:26 +0000 >Subject: [PATCH] Bug 35973: Correct wrong values for RedirectGuaranteeEmail > system preference > >The system preferences was added with 0/1 in sysprefs.sql is checked >as boolean. But the .pref file was added with yes/no which both >evaluate as strings to true. > >This fixes the .pref file and includes a database update that sets >0 and 1 correctly for the value currently chosen in the pref. > >To test: >* Make sure to update RedirectGuaranteeEmail to Enable/Don't enable > before applying the patch >* Verify in the database, that the values was set to yes or no > You can use a report like: > SELECT * from systempreferences WHERE variable = "RedirectGuaranteeEmail"; >* Apply patch and run database update >* Verify the value in the database was corrected: > Yes = 1, No = 0 >* Change the setting, verify the new value is stored correctly > >Signed-off-by: David Nind <david@davidnind.com> >--- > installer/data/mysql/atomicupdate/bug_35973.pl | 16 ++++++++++++++++ > .../en/modules/admin/preferences/patrons.pref | 4 ++-- > 2 files changed, 18 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_35973.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_35973.pl b/installer/data/mysql/atomicupdate/bug_35973.pl >new file mode 100644 >index 0000000000..e41cda31e0 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_35973.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "35973", >+ description => "Correct system preference 'RedirectGuaranteeEmail'", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Do you stuffs here >+ $dbh->do(q{UPDATE systempreferences SET value = 1 WHERE variable = "RedirectGuaranteeEmail" and value = "yes"}); >+ $dbh->do(q{UPDATE systempreferences SET value = 0 WHERE variable = "RedirectGuaranteeEmail" and value = "no"}); >+ >+ say $out "Corrected system preference 'RedirectGuaranteeEmail'"; >+ }, >+}; >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 f48ba4c13c..56a8471d47 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 >@@ -373,8 +373,8 @@ Patrons: > - > - pref: RedirectGuaranteeEmail > choices: >- yes: Enable >- no: Disable >+ 1: Enable >+ 0: Disable > - sending emails to both guarantees and their guarantor. This does not affect patrons without guarantors. > - > - pref: AllowStaffToSetFinesVisibilityForGuarantor >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35973
:
163289
|
163725
|
165173
|
165174