From a7b0bdec693c7d53f37a2e93e6db2f759b49a9a8 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 9 Jan 2015 15:22:04 +0000 Subject: Bug 1119804: Docker's generate_bmo_data.pl should add missing INCOMPLETE resolution --- contrib/docker/generate_bmo_data.pl | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) (limited to 'contrib') diff --git a/contrib/docker/generate_bmo_data.pl b/contrib/docker/generate_bmo_data.pl index 88e5ccbde..575729f1c 100755 --- a/contrib/docker/generate_bmo_data.pl +++ b/contrib/docker/generate_bmo_data.pl @@ -639,6 +639,73 @@ if (!$dbh->selectrow_array("SELECT 1 FROM bug_status WHERE value = 'ASSIGNED'")) } } +########################################################### +# Creating resolutions +########################################################### + +my @resolutions = ( + { + value => '', + sortkey => 100, + isactive => 1, + }, + { + value => 'FIXED', + sortkey => 200, + isactive => 1, + }, + { + value => 'INVALID', + sortkey => 300, + isactive => 1, + }, + { + value => 'WONTFIX', + sortkey => 400, + isactive => 1, + }, + { + value => 'DUPLICATE', + sortkey => 700, + isactive => 1, + }, + { + value => 'WORKSFORME', + sortkey => 800, + isactive => 1, + }, + { + value => 'EXPIRED', + sortkey => 900, + isactive => 1, + }, + { + value => 'MOVED', + sortkey => 1000, + isactive => 0, + }, + { + value => 'INCOMPLETE', + sortkey => 850, + isactive => 1, + }, + { + value => 'SUPPORT', + sortkey => 875, + isactive => 0, + }, +); + +if (!$dbh->selectrow_array("SELECT 1 FROM resolution WHERE value = 'INCOMPLETE'")) { + $dbh->do('DELETE FROM resolution'); + print "creating resolutions...\n"; + foreach my $resolution (@resolutions) { + next if !$resolution->{value}; + $dbh->do('INSERT INTO resolution (value, sortkey, isactive) VALUES (?, ?, ?)', + undef, ($resolution->{value}, $resolution->{sortkey}, $resolution->{isactive})); + } +} + ########################################################### # Create Keywords ########################################################### -- cgit v1.2.3-24-g4f1b