Bugzilla – Attachment 151246 Details for
Bug 33300
Wrong system preference name AutomaticWrongTransfer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33300: [22.05.x] (follow-up) DBRev for existing databases
Bug-33300-2205x-follow-up-DBRev-for-existing-datab.patch (text/plain), 2.57 KB, created by
Fridolin Somers
on 2023-05-16 07:09:11 UTC
(
hide
)
Description:
Bug 33300: [22.05.x] (follow-up) DBRev for existing databases
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2023-05-16 07:09:11 UTC
Size:
2.57 KB
patch
obsolete
>From be98235195cccb6e0d7bb289753aa812bfde2d9e Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 22 Mar 2023 21:14:43 -1000 >Subject: [PATCH] Bug 33300: [22.05.x] (follow-up) DBRev for existing databases > >Test plan : >1.1) Start from a Koha 22.05 >1.2) Upgrade to master >=> Check the upgrade says : > Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer' >2.1) Start from a Koha 22.05 >2.2) Upgrade to 22.11 >2.3) Via interface change system preference 'AutomaticConfirmTransfer' and save >2.4) Upgrade to master >=> Check the upgrade says : > Wrong system preference 'AutomaticWrongTransfer' deleted > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../data/mysql/atomicupdate/bug_33300.pl | 32 +++++++++++++++++++ > 1 file changed, 32 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_33300.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33300.pl b/installer/data/mysql/atomicupdate/bug_33300.pl >new file mode 100755 >index 0000000000..01b36b2c61 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33300.pl >@@ -0,0 +1,32 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33300", >+ description => "Fix missing wrong system preference 'AutomaticWrongTransfer'", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ my ($wrong_syspref_exists) = $dbh->selectrow_array(q{ >+ SELECT COUNT(*) FROM systempreferences WHERE variable='AutomaticWrongTransfer' >+ }); >+ if ($wrong_syspref_exists) { >+ # Correct preference may have been generated via interface >+ my ($correct_syspref_exists) = $dbh->selectrow_array(q{ >+ SELECT COUNT(*) FROM systempreferences WHERE variable='AutomaticConfirmTransfer' >+ }); >+ if ( $correct_syspref_exists ) { >+ $dbh->do(q{ >+ DELETE FROM systempreferences WHERE variable='AutomaticWrongTransfer' >+ }); >+ say $out "Wrong system preference 'AutomaticWrongTransfer' deleted"; >+ } else { >+ $dbh->do(q{ >+ UPDATE systempreferences SET variable='AutomaticConfirmTransfer' WHERE variable='AutomaticWrongTransfer' >+ }); >+ say $out "Wrong system preference 'AutomaticWrongTransfer' renamed 'AutomaticConfirmTransfer'"; >+ } >+ } else { >+ say $out "Wrong system preference 'AutomaticWrongTransfer' does not exist"; >+ } >+ }, >+}; >-- >2.40.1
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 33300
:
148505
|
148508
|
148581
|
148585
|
149721
|
149793
|
149794
|
151246
|
151247
|
151248