Closed Bug 175838 Opened 22 years ago Closed 22 years ago

Reopening a bug does not clear resolution, nor does selecting 'clear resolution'

Categories

(Bugzilla :: Creating/Changing Bugs, defect, P1)

Other
Other
defect

Tracking

()

VERIFIED FIXED
Bugzilla 2.18

People

(Reporter: jeff.hedlund, Assigned: jeff.hedlund)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

Reopening a bug results in a REOPENED FIXED status/resolution. Using the knob "clear resolution" fails to work.
Attached patch Patch v.1 (obsolete) — Splinter Review
This corrects the issue. I don't see a need for the dontchange check in ChangeResolution since it will not be called if the knob is set to "none" in a multiple bug change. It did not work because in single bug edit, FORM(dontchange) was not set so the string was equaling the zero length dontchange. I could check for the definition of dontchange, but it will never equal dontchange even in multiple change. (at least not how it is currently setup).
Something sounds a little fishy on this.... Why is it using $FORM{dontchange} to begin with? Why would that be in the form? Shouldn't we be checking the value of some other form field against something we have stored locally in the code?
Severity: normal → major
Keywords: regression
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
Also in testing this patch, When reopening a bug, the resolution is always cleared. So should we do away with the Clear resolution choice altogether?
Gerv changed the dontchange stuff a few weeks ago, and for a single bug change we don't have a $::FORM{dontchange}. We need to check anywhere else which is broken by this. This specific thing seems to date back basically forever, so there may not be a reason....
"Clear resolution" is basically a failsafe in case things like this happen. They never should, but if they do, it gives people a way to deal with it until the bug is fixed. Except Clear resolution is supposed to work. :)
Severity: major → blocker
Comment on attachment 103608 [details] [diff] [review] Patch v.1 This attachment will break multiple-changes; in every multiple change, it will change the resolution field of all bugs to the string "--do_not_change--", or whatever the dontchange string is set to. You need to do: if ($::FORM{'dontchange'} && ($str ne $::FORM{'dontchange'})) { ... Gerv
> You need to do: > if ($::FORM{'dontchange'} && > ($str ne $::FORM{'dontchange'})) > { This doesn't work for the same reason that the bug was filed-- ($str ne $::FORM{'dontchange'}) always returns false on the single edit bug page. > This attachment will break multiple-changes; in every multiple change, it will > change the resolution field of all bugs to the string "--do_not_change--", or > whatever the dontchange string is set to. It actually doesn't break it, because ChangeResolution() [currently] never gets sent a field that would have --do_not_change-- in it. The only form value it gets sent is $::FORM{'resolution'} which doesn't get a --do_not_change-- value in the multiple-edit page. ?
How about: if (!$::FORM{'dontchange'} || # single-bug case ($str ne $::FORM{'dontchange'})) # multiple-bug case { ... ? Gerv
Attached patch Patch v.2 (obsolete) — Splinter Review
WRT comment 8: Sounds good to me! I also updated ChangeStatus() to use the same check, though it currently doesn't fail the test (b/c it is not being sent an empty string, at this point).
Attachment #103608 - Attachment is obsolete: true
Attached patch Patch v.2.1Splinter Review
Oops, fixing the space that will inevitably be a nit. :)
Attachment #104602 - Attachment is obsolete: true
Comment on attachment 104603 [details] [diff] [review] Patch v.2.1 r=gerv, assuming it fixes the problem. Gerv
Attachment #104603 - Flags: review+
Checked in for Jeff: Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.161; previous revision: 1.160 done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
OK, this didn't quite work.... In testing this fix on landfill/bugzilla-tip, I got the following results: From show_bug.cgi: Clear resolution: works Reopen: works From buglist.cgi (aka mass-change): Clear resolution: works Reopen: fails The mass-reopen results in a Bugzilla header at the top of the page with nothing under it. The page appears to just stop. The error log has the following: [Wed Oct 30 19:49:32 2002] process_bug.cgi: Use of uninitialized value in concatenation (.) or string at /var/www/html/bugzilla-tip/process_bug.cgi line 901. [Wed Oct 30 19:49:32 2002] process_bug.cgi: DBD::mysql::st execute failed: You have an error in your SQL syntax near '' at line 1 at globals.pl line 237. SELECT resolution FROM bugs WHERE bug_id = : You have an error in your SQL syntax near '' at line 1 at /usr/lib/perl5/5.6.1/CGI/Carp.pm line 301. Since we got 3 out of the 4 and mass-reopen isn't all that common, I will open a new bug for fixing mass reopen rather than back this out.
Status: RESOLVED → VERIFIED
The new bug is bug 177627
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: