I don't know what regressed it, but doing a mass-change deletes all values already set to multi-select fields, even with --do_not_change--.
Created attachment 301373 [details] [diff] [review] patch, v1 $cgi->param('defined_foo') must be deleted if $cgi->param('foo') eq '--do_not_change--' else process_bug.cgi sees that as a wish to clear the 'foo' field.
Assignee: create-and-change → LpSolit
Status: NEW → ASSIGNED
Attachment #301373 - Flags: review?(mkanat)
Comment on attachment 301373 [details] [diff] [review] patch, v1 >+ # Ignore defined_$name if param($name) eq dontchange. >+ next if !defined $cgi->param($name); Wait, that doesn't seem to do what the comment above states...?
(In reply to comment #2) > Wait, that doesn't seem to do what the comment above states...? It does. When cf_<multi_select_name> eq 'dontchange', we delete defined_cf_<multi_select_name> else we are going to erase everything. So when we encounter defined_cf_<multi_select_name> in the foreach loop (foreach my $name ($cgi->param)), we have to skip it as it has already been deleted, and so $cgi->param('defined_cf_<multi_select_name>') is undefined. Else we get an error about an uninitialized value when doing the 'eq' comparison.
Comment on attachment 301373 [details] [diff] [review] patch, v1 Ah, I get it now. On checkin, change the comment to: # Skip ones we've already deleted (such as "defined_$name").
Attachment #301373 - Flags: review?(mkanat) → review+
I fixed the comment on checkin: Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.404; previous revision: 1.403 done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.