summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-12-13 00:17:28 +0100
committerGitHub <noreply@github.com>2017-12-13 00:17:28 +0100
commitceea6631ea09853ad80bf0873d1cc91acc85c18d (patch)
treeb4f19e0c0448807c98cbfe67317f7ab8aee927c0 /scripts
parentce6b8e17809f10f366d599f270631dcff6fe63b4 (diff)
downloadbugzilla-ceea6631ea09853ad80bf0873d1cc91acc85c18d.tar.gz
bugzilla-ceea6631ea09853ad80bf0873d1cc91acc85c18d.tar.xz
no bug - add bmo product and cf_due_date to testing data set (#293)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_bmo_data.pl63
1 files changed, 61 insertions, 2 deletions
diff --git a/scripts/generate_bmo_data.pl b/scripts/generate_bmo_data.pl
index b2df7ddba..526607eff 100755
--- a/scripts/generate_bmo_data.pl
+++ b/scripts/generate_bmo_data.pl
@@ -3,12 +3,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+use 5.10.1;
use strict;
use warnings;
use lib qw(. lib local/lib/perl5);
-
-
use Bugzilla;
use Bugzilla::User;
use Bugzilla::Install;
@@ -270,6 +269,26 @@ my @products = (
}
],
},
+ {
+ classification => 'Other',
+ product_name => 'bugzilla.mozilla.org',
+ description => 'For issues relating to the bugzilla.mozilla.org website, '
+ . 'also known as <a href="https://wiki.mozilla.org/BMO">BMO</a>.',
+ versions => ['Development/Staging', 'Production'],
+ milestones => [ '---' ],
+ defaultmilestone => '---',
+ components => [
+ {
+ name => 'General',
+ description => 'This is the component for issues specific to bugzilla.mozilla.org '
+ . 'that do not belong in other components.',
+ initialowner => 'nobody@mozilla.org',
+ initialqaowner => '',
+ initial_cc => [],
+ watch_user => 'general@bugzilla.bugs'
+ }
+ ],
+ },
);
my $default_op_sys_id
@@ -438,6 +457,46 @@ foreach my $group (@groups) {
}
}
+my @fields = (
+ {
+ name => 'cf_due_date',
+ description => 'Due Date',
+ type => FIELD_TYPE_DATE,
+ sortkey => 949,
+ mailhead => 0,
+ enter_bug => 1,
+ obsolete => 0,
+ custom => 1,
+ buglist => 1,
+ reverse_desc => "",
+ is_mandatory => 0,
+ }
+);
+
+say 'creating custom fields';
+foreach my $field (@fields) {
+ next if Bugzilla::Field->new({name => $field->{name}});
+ my $field_obj = Bugzilla::Field->create(
+ {
+ name => $field->{name},
+ description => $field->{description},
+ type => $field->{type},
+ sortkey => $field->{sortkey},
+ mailhead => $field->{new_bugmail},
+ enter_bug => $field->{enter_bug},
+ obsolete => $field->{obsolete},
+ custom => 1,
+ buglist => 1,
+ visibility_field_id => $field->{visibility_field_id},
+ visibility_values => $field->{visibility_values},
+ value_field_id => $field->{value_field_id},
+ reverse_desc => $field->{reverse_desc},
+ is_mandatory => $field->{is_mandatory},
+ }
+ );
+}
+
+
# Update default security group settings for new products
my $default_security_group = Bugzilla::Group->new({ name => 'core-security' });
if ($default_security_group) {