Closed
Bug 282090
Opened 20 years ago
Closed 19 years ago
Eliminate %classdesc in favor of Bugzilla::Classification methods
Categories
(Bugzilla :: Bugzilla-General, enhancement, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
Instead of being a global variable, %classifications should come out of a
subroutine in Bugzilla::Classification (which is a new module).
Assignee | ||
Updated•20 years ago
|
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.22
Assignee | ||
Updated•19 years ago
|
Assignee | ||
Updated•19 years ago
|
Summary: Move %classifications to Bugzilla::Classification → Move %classifications and %classdesc to Bugzilla::Classification
Assignee | ||
Comment 1•19 years ago
|
||
OK, instead, let's just get rid of them and use methods from the new
Bugzilla::Classification instead.
Summary: Move %classifications and %classdesc to Bugzilla::Classification → Eliminate %classifications and %classdesc in favor of Bugzilla::Classification methods
Assignee | ||
Comment 2•19 years ago
|
||
OK, let's just do one variable at a time, it's easiest that way. It's really,
really easy to eliminate classdesc at this point, so I'm going to do that.
Summary: Eliminate %classifications and %classdesc in favor of Bugzilla::Classification methods → Eliminate %classdesc in favor of Bugzilla::Classification methods
Assignee | ||
Comment 3•19 years ago
|
||
Apparently only enter_bug.cgi was using classdesc, so this patch is nice and
small. I've tested it with useclassification on and off, and it works both
ways.
Assignee | ||
Updated•19 years ago
|
Attachment #198641 -
Flags: review?(wicked)
Comment 4•19 years ago
|
||
Comment on attachment 198641 [details] [diff] [review]
v1
>Index: enter_bug.cgi
>===================================================================
>@@ -76,7 +77,9 @@
>
> if ( ! Param('useclassification') ) {
> # just pick the default one
>- $cgi->param(-name => 'classification', -value => (keys %::classdesc)[0]);
>+ my $default_classification = new Bugzilla::Classification(
>+ Bugzilla::Product::DEFAULT_CLASSIFICATION_ID);
>+ $cgi->param(-name => 'classification', -value => $default_classification->name);
Nit: Is there any reason why this shouldn't just set classification param to
__all? That way there's no unnecessary DB access. Code already shows all
products regardles of classification if useclassification is not defined.
Otherwise this seems to work, r=wicked. I also tested with a line
$cgi->param(-name => 'classification', -value => '__all');
so that should work too. You can carry forward my r+ if you just change that
line (and comment) to fix my nit.
Attachment #198641 -
Flags: review?(wicked) → review+
Assignee | ||
Comment 5•19 years ago
|
||
I think I'd like to leave it as it is for now, and then when we get around to
removing the "useclassification" param, we can get rid of that line, also.
Status: NEW → ASSIGNED
Flags: approval?
Comment 6•19 years ago
|
||
Comment on attachment 198641 [details] [diff] [review]
v1
bitrotten!
Updated•19 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 7•19 years ago
|
||
OK, because I hit bitrot in the area wicked commented on, I used his fix as the
simplest solution. This also allowed me to remove the "use Bugzilla::Product"
and "use Bugzilla::Classification" from enter_bug.cgi.
Assignee | ||
Updated•19 years ago
|
Attachment #198641 -
Attachment is obsolete: true
Attachment #199211 -
Flags: review+
Assignee | ||
Comment 8•19 years ago
|
||
Checking in enter_bug.cgi;
/cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi
new revision: 1.121; previous revision: 1.120
done
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl
new revision: 1.341; previous revision: 1.340
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•