Closed
Bug 398739
Opened 18 years ago
Closed 18 years ago
"Taking a bug" while adding a new attachment locks the bug status forever if the ASSIGNED bug status has been renamed or deleted
Categories
(Bugzilla :: Attachments & Requests, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
|
5.22 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
When you take a bug while adding a new attachment, attachment.cgi runs:
my @newvalues = ($user->id, "ASSIGNED", "", 1, $user->login);
$dbh->do('UPDATE bugs SET delta_ts = ?, ' .
join(', ', map("$fields[$_] = ?", (0..3))) . ' WHERE bug_id = ?',
undef, ($timestamp, map($newvalues[$_], (0..3)) , $bugid));
This means the bug status is set to ASSIGNED. But if you renamed or deleted this bug status (from editvalues.cgi), ASSIGNED isn't valid and process_bug.cgi will reject all subsequent changes made against the bug as no bug status transition between the unknown ASSIGNED status and any other status is defined in the workflow.
The reason to mark this bug as a blocker is that the first bug status you would rename is ASSIGNED (to INPROGRESS, ACCEPTED or anything else, based on previous bug reports on b.m.o), so the probability to see such problems is very high.
Flags: blocking3.1.3+
| Assignee | ||
Updated•18 years ago
|
Flags: testcase?
| Assignee | ||
Comment 1•18 years ago
|
||
Max, could you give a quick glance at the patch? Just in case I missed something.
Attachment #283840 -
Flags: review?(mkanat)
Comment 2•18 years ago
|
||
Comment on attachment 283840 [details] [diff] [review]
patch, v1
>+++ Bugzilla/Bug.pm 6 Oct 2007 15:52:04 -0000
>@@ -1139,6 +1139,9 @@ sub _check_rep_platform {
> sub _check_resolution {
> my ($invocant, $resolution) = @_;
> $resolution = trim($resolution);
>+ # '' is a valid resolution for open bugs.
>+ return '' if !$resolution;
>+
> check_field('resolution', $resolution);
> return $resolution;
> }
Add a clear_resolution sub instead. '' shouldn't be a valid, settable resolution with set_resolution. (This is the r-.)
>+ [% IF bug_statuses.size %]
>+ <label for="takebug">and set the [% terms.bug %] status to</label>
It shouldn't be "and set the bug to", because what if I'm already assigned the bug but I want to change it to ASSIGNED now that there's a patch?
Attachment #283840 -
Flags: review?(mkanat) → review-
| Assignee | ||
Comment 3•18 years ago
|
||
(In reply to comment #2)
> Add a clear_resolution sub instead. '' shouldn't be a valid, settable
> resolution with set_resolution. (This is the r-.)
'' *is* a valid resolution, which is in the resolution DB table.
> It shouldn't be "and set the bug to", because what if I'm already assigned
> the bug but I want to change it to ASSIGNED now that there's a patch?
If the bug is already assigned to you, you don't see this select field at all. That's intentional. So the wording is correct.
| Assignee | ||
Comment 4•18 years ago
|
||
Implement $bug->clear_resolution() instead of $bug->set_resolution('').
Attachment #283840 -
Attachment is obsolete: true
Attachment #283942 -
Flags: review?(mkanat)
Comment 5•18 years ago
|
||
Comment on attachment 283942 [details] [diff] [review]
patch, v2
Great! Thank you. :-)
Attachment #283942 -
Flags: review?(mkanat) → review+
| Assignee | ||
Updated•18 years ago
|
Flags: approval+
| Assignee | ||
Comment 6•18 years ago
|
||
Checking in attachment.cgi;
/cvsroot/mozilla/webtools/bugzilla/attachment.cgi,v <-- attachment.cgi
new revision: 1.132; previous revision: 1.131
done
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm
new revision: 1.206; previous revision: 1.205
done
Checking in template/en/default/attachment/create.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/attachment/create.html.tmpl,v <-- create.html.tmpl
new revision: 1.33; previous revision: 1.32
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•14 years ago
|
Flags: testcase?
You need to log in
before you can comment on or make changes to this bug.
Description
•