Bug 29129: (QA follow-up) Tidy atomicupdate

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2022-06-25 11:15:12 -03:00
parent 27a81ba75d
commit 6dbb9c3690
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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';
});
},
};