From f27aaa287562fb880934565d6a091ab1674bfab4 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Wed, 19 Jul 2006 04:10:31 +0000 Subject: Bug 344521: Make custom fields optionally functional on enter_bug.cgi Patch By Max Kanat-Alexander r=LpSolit, a=myk --- enter_bug.cgi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'enter_bug.cgi') diff --git a/enter_bug.cgi b/enter_bug.cgi index 66f4109c7..70c989eca 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -336,6 +336,13 @@ $vars->{'cloned_bug_id'} = $cloned_bug_id; $vars->{'token'} = Bugzilla::Token::IssueSessionToken('createbug:'); + +my @enter_bug_fields = Bugzilla->get_fields({ custom => 1, obsolete => 0, + enter_bug => 1 }); +foreach my $field (@enter_bug_fields) { + $vars->{$field->name} = formvalue($field->name); +} + if ($cloned_bug_id) { $default{'component_'} = $cloned_bug->{'component'}; @@ -357,6 +364,10 @@ if ($cloned_bug_id) { $vars->{'cc'} = formvalue('cc'); } + foreach my $field (@enter_bug_fields) { + $vars->{$field->name} = $cloned_bug->{$field->name}; + } + # We need to ensure that we respect the 'insider' status of # the first comment, if it has one. Either way, make a note # that this bug was cloned from another bug. -- cgit v1.2.3-24-g4f1b