From 8f33041e6542f12e6897ef6ed7a67c43a118c504 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Wed, 23 Jun 2010 17:39:11 -0700 Subject: Bug 572602: Change the way that Bugzilla::Object determines what fields are required for create(). It now assumes that any column that is NOT NULL and has not DEFAULT in the database is required. We also shift the burden of throwing errors about empty values to the validators. This fixes the bug that Bugzilla::Bug->create() wasn't populating default values for fields if they weren't specified in the create() parameters. r=timello, a=mkanat --- email_in.pl | 7 ------- 1 file changed, 7 deletions(-) (limited to 'email_in.pl') diff --git a/email_in.pl b/email_in.pl index 52ad27642..6033c31c4 100755 --- a/email_in.pl +++ b/email_in.pl @@ -152,13 +152,6 @@ sub post_bug { my $user = Bugzilla->user; - # Bugzilla::Bug->create throws a confusing CodeError if - # the REQUIRED_CREATE_FIELDS are missing, but much more - # sensible errors if the fields exist but are just undef. - foreach my $field (Bugzilla::Bug::REQUIRED_CREATE_FIELDS) { - $fields->{$field} = undef if !exists $fields->{$field}; - } - my ($retval, $non_conclusive_fields) = Bugzilla::User::match_field({ 'assigned_to' => { 'type' => 'single' }, -- cgit v1.2.3-24-g4f1b