diff options
author | David Lawrence <dkl@mozilla.com> | 2015-01-09 16:22:04 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-01-09 16:22:04 +0100 |
commit | a7b0bdec693c7d53f37a2e93e6db2f759b49a9a8 (patch) | |
tree | 387558ed7e270d4cd235518f10f7cf7eef2eb5e0 /contrib/docker/generate_bmo_data.pl | |
parent | ec05da49c920d01f931d36c66d4f3edc495f21fb (diff) | |
download | bugzilla-a7b0bdec693c7d53f37a2e93e6db2f759b49a9a8.tar.gz bugzilla-a7b0bdec693c7d53f37a2e93e6db2f759b49a9a8.tar.xz |
Bug 1119804: Docker's generate_bmo_data.pl should add missing INCOMPLETE resolution
Diffstat (limited to 'contrib/docker/generate_bmo_data.pl')
-rwxr-xr-x | contrib/docker/generate_bmo_data.pl | 67 |
1 files changed, 67 insertions, 0 deletions
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 @@ -640,6 +640,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 ########################################################### |