summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-09-15 06:50:07 +0200
committerjake%acutex.net <>2001-09-15 06:50:07 +0200
commit247a503301908fec8c6f4fb7c2e8038809710892 (patch)
tree0bbb5c134c3c100df93988a47ac248830660e72b /process_bug.cgi
parent1e5a42d8225720233c9c698c48a4a733b3ad1841 (diff)
downloadbugzilla-247a503301908fec8c6f4fb7c2e8038809710892.tar.gz
bugzilla-247a503301908fec8c6f4fb7c2e8038809710892.tar.xz
Fix for bug 30731 - Reassigning closed bugs from the mass change page caused their status to be set to new.
r= myk@mozilla.org, zach@zachlipton.com
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi14
1 files changed, 13 insertions, 1 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 70d2625ba..0baadda9a 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -507,7 +507,19 @@ sub ChangeStatus {
my ($str) = (@_);
if ($str ne $::dontchange) {
DoComma();
- if (IsOpenedState($str)) {
+ # Ugly, but functional. We don't want to change Status if we are
+ # reasigning non-open bugs via the mass change form.
+ if ( ($::FORM{knob} eq 'reassign' || $::FORM{knob} eq 'reassignbycomponent') &&
+ ! defined $::FORM{id} && $str eq 'NEW' ) {
+ # If we got to here, we're dealing with a reassign from the mass
+ # change page. We don't know (and can't easily figure out) if this
+ # bug is open or closed. If it's closed, we don't want to change
+ # its status to NEW. We have to put some logic into the SQL itself
+ # to handle that.
+ my @open_state = map(SqlQuote($_), OpenStates());
+ my $open_state = join(", ", @open_state);
+ $::query .= "bug_status = IF(bug_status IN($open_state), '$str', bug_status)";
+ } elsif (IsOpenedState($str)) {
$::query .= "bug_status = IF(everconfirmed = 1, '$str', '$::unconfirmedstate')";
} else {
$::query .= "bug_status = '$str'";