summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorolav%bkor.dhs.org <>2006-11-05 09:27:09 +0100
committerolav%bkor.dhs.org <>2006-11-05 09:27:09 +0100
commit8109df6a8bda8d2aa13f1e8545bccff0e06d42a7 (patch)
tree91403e3d55a226064b7840d63bf19a5985cc7e63 /process_bug.cgi
parent95da8f434f1cdf24e7702e0b807cb26eca986eb2 (diff)
downloadbugzilla-8109df6a8bda8d2aa13f1e8545bccff0e06d42a7.tar.gz
bugzilla-8109df6a8bda8d2aa13f1e8545bccff0e06d42a7.tar.xz
Bug 309167: change to product which has same component name results in no prompt for component and incorrect assignee
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=myk
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi17
1 files changed, 11 insertions, 6 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 33a5c75ec..d3f52641e 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -374,11 +374,14 @@ if (((defined $cgi->param('id') && $cgi->param('product') ne $oldproduct)
$mok = lsearch(\@milestone_names, $cgi->param('target_milestone')) >= 0;
}
- # If the product-specific fields need to be verified, or we need to verify
- # whether or not to add the bugs to their new product's group, display
- # a verification form.
- if (!$vok || !$cok || !$mok || (AnyDefaultGroups()
- && !defined $cgi->param('addtonewgroup'))) {
+ # We cannot be sure if the component is the same by only checking $cok; the
+ # current component name could exist in the new product. So always display
+ # the form and use the confirm_product_change param to check if that was
+ # shown. Also show the verification form if the product-specific fields
+ # somehow still need to be verified, or if we need to verify whether or not
+ # to add the bugs to their new product's group.
+ if (!$vok || !$cok || !$mok || !defined $cgi->param('confirm_product_change')
+ || (AnyDefaultGroups() && !defined $cgi->param('addtonewgroup'))) {
if (Bugzilla->usage_mode == USAGE_MODE_EMAIL) {
if (!$vok) {
@@ -398,7 +401,9 @@ if (((defined $cgi->param('id') && $cgi->param('product') ne $oldproduct)
}
}
- if (!$vok || !$cok || !$mok) {
+ if (!$vok || !$cok || !$mok
+ || !defined $cgi->param('confirm_product_change'))
+ {
$vars->{'verify_fields'} = 1;
my %defaults;
# We set the defaults to these fields to the old value,