summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-07-19 06:10:31 +0200
committermkanat%bugzilla.org <>2006-07-19 06:10:31 +0200
commitf27aaa287562fb880934565d6a091ab1674bfab4 (patch)
treeef713bebee235631f1435d0312a0494caed9c8c1 /enter_bug.cgi
parentaa205508ed3bc52b02cde76286daaec40aebfa5c (diff)
downloadbugzilla-f27aaa287562fb880934565d6a091ab1674bfab4.tar.gz
bugzilla-f27aaa287562fb880934565d6a091ab1674bfab4.tar.xz
Bug 344521: Make custom fields optionally functional on enter_bug.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi11
1 files changed, 11 insertions, 0 deletions
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.