Closed
Bug 415544
Opened 16 years ago
Closed 16 years ago
Mass-change erases all values from custom multi-select fields
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: LpSolit, Assigned: LpSolit)
Details
(Keywords: dataloss, regression)
Attachments
(1 file)
1.21 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
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--.
Flags: blocking3.2+
Assignee | ||
Comment 1•16 years ago
|
||
$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 2•16 years ago
|
||
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...?
Assignee | ||
Comment 3•16 years ago
|
||
(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 4•16 years ago
|
||
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+
Updated•16 years ago
|
Flags: approval+
Assignee | ||
Comment 5•16 years ago
|
||
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
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•