From 6dbb9c3690dffabe85a1dfb119291e7169bd4831 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sat, 25 Jun 2022 11:15:12 -0300 Subject: [PATCH] Bug 29129: (QA follow-up) Tidy atomicupdate Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug29129.pl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug29129.pl b/installer/data/mysql/atomicupdate/bug29129.pl index f5d5c3ea94..8fc89a37d8 100755 --- a/installer/data/mysql/atomicupdate/bug29129.pl +++ b/installer/data/mysql/atomicupdate/bug29129.pl @@ -1,16 +1,22 @@ use Modern::Perl; return { - bug_number => "29129", + bug_number => "29129", description => "Update the DisplayClearnScreenButton system pref to allow for a choice between ISSUESLIP and ISSUEQSLIP", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - # Do you stuffs here + $dbh->do(q{ - UPDATE systempreferences SET options = 'no|issueslip|issueqslip', type = 'Choice', value = REPLACE( value, 0, 'no'), value = REPLACE( value, 1, 'issueslip') WHERE variable = 'DisplayClearScreenButton'; - }); - # Print useful stuff here - say $out "Database updated for Bug 29129"; + UPDATE systempreferences + SET + options = 'no|issueslip|issueqslip', + type = 'Choice', + value = CASE value + WHEN 1 THEN 'issueslip' + ELSE 'no' + END + WHERE variable = 'DisplayClearScreenButton'; + }); }, }; -- 2.39.5