diff options
author | mkanat%bugzilla.org <> | 2008-09-06 04:11:19 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-09-06 04:11:19 +0000 |
commit | c0c7dc6cc00de40bcdb31225ed6cb10110259425 (patch) | |
tree | 9f8dd35b52ebb5f343680bc829a05c8115e59bdf /enter_bug.cgi | |
parent | 28618aea558de167f80674a9bf65f865f63e0887 (diff) | |
download | bugs-c0c7dc6cc00de40bcdb31225ed6cb10110259425.tar bugs-c0c7dc6cc00de40bcdb31225ed6cb10110259425.tar.gz bugs-c0c7dc6cc00de40bcdb31225ed6cb10110259425.tar.bz2 bugs-c0c7dc6cc00de40bcdb31225ed6cb10110259425.tar.xz bugs-c0c7dc6cc00de40bcdb31225ed6cb10110259425.zip |
Bug 450197: Multi-select fields are ignored when cloning a bug
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-x | enter_bug.cgi | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi index ae1a03871..3f29acb8f 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -391,17 +391,17 @@ foreach my $field (@enter_bug_fields) { if ($cloned_bug_id) { $default{'component_'} = $cloned_bug->component; - $default{'priority'} = $cloned_bug->{'priority'}; - $default{'bug_severity'} = $cloned_bug->{'bug_severity'}; - $default{'rep_platform'} = $cloned_bug->{'rep_platform'}; - $default{'op_sys'} = $cloned_bug->{'op_sys'}; + $default{'priority'} = $cloned_bug->priority; + $default{'bug_severity'} = $cloned_bug->bug_severity; + $default{'rep_platform'} = $cloned_bug->rep_platform; + $default{'op_sys'} = $cloned_bug->op_sys; - $vars->{'short_desc'} = $cloned_bug->{'short_desc'}; - $vars->{'bug_file_loc'} = $cloned_bug->{'bug_file_loc'}; + $vars->{'short_desc'} = $cloned_bug->short_desc; + $vars->{'bug_file_loc'} = $cloned_bug->bug_file_loc; $vars->{'keywords'} = $cloned_bug->keywords; $vars->{'dependson'} = $cloned_bug_id; $vars->{'blocked'} = ""; - $vars->{'deadline'} = $cloned_bug->{'deadline'}; + $vars->{'deadline'} = $cloned_bug->deadline; if (defined $cloned_bug->cc) { $vars->{'cc'} = join (" ", @{$cloned_bug->cc}); @@ -410,30 +410,24 @@ if ($cloned_bug_id) { } foreach my $field (@enter_bug_fields) { - $vars->{$field->name} = $cloned_bug->{$field->name}; + my $field_name = $field->name; + $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. + # 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. - $cloned_bug->longdescs(); - my $isprivate = $cloned_bug->{'longdescs'}->[0]->{'isprivate'}; + my $isprivate = $cloned_bug->longdescs->[0]->{'isprivate'}; $vars->{'comment'} = ""; $vars->{'commentprivacy'} = 0; - if ( !($isprivate) || - ( ( Bugzilla->params->{"insidergroup"} ) && - ( Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}) ) ) - ) { - $vars->{'comment'} = $cloned_bug->{'longdescs'}->[0]->{'body'}; + if ( !($isprivate) || Bugzilla->user->is_insider ) { + $vars->{'comment'} = $cloned_bug->longdescs->[0]->{'body'}; $vars->{'commentprivacy'} = $isprivate; } -# Ensure that the groupset information is set up for later use. - $cloned_bug->groups(); - } # end of cloned bug entry form else { @@ -476,7 +470,7 @@ $vars->{'version'} = [map($_->name, @{$product->versions})]; if ( ($cloned_bug_id) && ($product->name eq $cloned_bug->product ) ) { - $default{'version'} = $cloned_bug->{'version'}; + $default{'version'} = $cloned_bug->version; } elsif (formvalue('version')) { $default{'version'} = formvalue('version'); } elsif (defined $cgi->cookie("VERSION-" . $product->name) && @@ -562,9 +556,9 @@ foreach my $row (@$grouplist) { # if ( ($cloned_bug_id) && ($product->name eq $cloned_bug->product ) ) { - foreach my $i (0..(@{$cloned_bug->{'groups'}}-1) ) { - if ($cloned_bug->{'groups'}->[$i]->{'bit'} == $id) { - $check = $cloned_bug->{'groups'}->[$i]->{'ison'}; + foreach my $i (0..(@{$cloned_bug->groups} - 1) ) { + if ($cloned_bug->groups->[$i]->{'bit'} == $id) { + $check = $cloned_bug->groups->[$i]->{'ison'}; } } } |