diff options
author | lpsolit%gmail.com <> | 2008-02-05 18:52:48 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-02-05 18:52:48 +0100 |
commit | 68a18acf705ba7b62d704e5796d3f5c1a8ea9c72 (patch) | |
tree | e2ee3fa94d33086d3284aea242c09117e42b0c4f | |
parent | 2b3d9fb410b0468259ecfd0e5f9852f1c0c5b225 (diff) | |
download | bugzilla-68a18acf705ba7b62d704e5796d3f5c1a8ea9c72.tar.gz bugzilla-68a18acf705ba7b62d704e5796d3f5c1a8ea9c72.tar.xz |
Bug 415544: Mass-change erases all values from custom multi-select fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rwxr-xr-x | process_bug.cgi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index 0e081b407..1cc4e542d 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -89,8 +89,7 @@ sub send_results { $vars->{'header_done'} = 1; } -# Tells us whether or not a field should be changed by process_bug, by -# checking that it's defined and not set to dontchange. +# Tells us whether or not a field should be changed by process_bug. sub should_set { # check_defined is used for fields where there's another field # whose name starts with "defined_" and then the field name--it's used @@ -141,8 +140,11 @@ my $first_bug = $bug_objects[0]; # Used when we're only updating a single bug. if (defined $cgi->param('dontchange')) { foreach my $name ($cgi->param) { next if $name eq 'dontchange'; # But don't delete dontchange itself! + # Skip ones we've already deleted (such as "defined_$name"). + next if !defined $cgi->param($name); if ($cgi->param($name) eq $cgi->param('dontchange')) { $cgi->delete($name); + $cgi->delete("defined_$name"); } } } |