From a589e55a6f061ffbc223ccc99be1ff6052cf41bf Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 11 Apr 2009 23:33:24 +0000 Subject: Bug 487769: checksetup.pl can no longer create versions in TestProduct due to insufficient privileges (checksetup.pl fails) - Patch by Max Kanat-Alexander r/a=LpSolit --- Bugzilla/Component.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Component.pm') 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; -- cgit v1.2.3-24-g4f1b