summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Component.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Component.pm')
-rw-r--r--Bugzilla/Component.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm
index f5719e82c..194a3957c 100644
--- a/Bugzilla/Component.pm
+++ b/Bugzilla/Component.pm
@@ -60,6 +60,7 @@ use constant UPDATE_COLUMNS => qw(
);
use constant VALIDATORS => {
+ create_series => \&Bugzilla::Object::check_boolean,
product => \&_check_product,
initialowner => \&_check_initialowner,
initialqacontact => \&_check_initialqacontact,
@@ -114,14 +115,15 @@ sub create {
$class->check_required_create_fields(@_);
my $params = $class->run_create_validators(@_);
my $cc_list = delete $params->{initial_cc};
+ my $create_series = delete $params->{create_series};
my $component = $class->insert_create_data($params);
# We still have to fill the component_cc table.
- $component->_update_cc_list($cc_list);
+ $component->_update_cc_list($cc_list) if $cc_list;
# Create series for the new component.
- $component->_create_series();
+ $component->_create_series() if $create_series;
$dbh->bz_commit_transaction();
return $component;