Closed Bug 545587 Opened 15 years ago Closed 15 years ago

colchange.cgi should use the database to determine buglist-able columns

Categories

(Bugzilla :: Query/Bug List, enhancement)

3.5.3
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

Now that fielddefs has a "buglist" column, colchange should be getting its information from the database instead of having a static list.
Attached patch v1 (obsolete) (deleted) — Splinter Review
This turned out to be very easy. :-)
Assignee: query-and-buglist → mkanat
Status: NEW → ASSIGNED
Attachment #427023 - Flags: review?(LpSolit)
Comment on attachment 427023 [details] [diff] [review] v1 >=== modified file 'colchange.cgi' >+use constant COLUMN_PARAMS => { 'usestatuswhiteboard' is missing. >+foreach my $param (keys %{ COLUMN_PARAMS() }) { >+ foreach my $column (@{ COLUMN_PARAMS->{$param} }) { >+ delete $columns->{$column} if !Bugzilla->params->{$param}; >+ } >+} This would be cleaner and more logical as: foreach my $param (keys %{ COLUMN_PARAMS() }) { next if Bugzilla->params->{$param}; foreach my $column (@{ COLUMN_PARAMS->{$param} }) { delete $columns->{$column}; } } This way, you check Bugzilla->params->{$param} only once per parameter. >+foreach my $class (keys %{ COLUMN_CLASSES() }) { >+ eval("use $class"); This eval() is useless. Also, the column list in colchange.cgi is now random and pretty confusing. For now, I think it should just be sorted alphabetically. Otherwise looks good and works fine.
Attachment #427023 - Flags: review?(LpSolit) → review-
Attached patch v2 (deleted) — Splinter Review
Thanks for catching all that stuff. I kept the eval(use) in there, because I don't know if the other modules will keep "use"ing Bugzilla::Keyword and Bugzilla::Flag, so we should explicitly use them here just in case. Also, I realized that "relevance" needed to be excluded from the column list, so I did. I'm sorting the available columns case-sensitively and alphabetically now. I changed the name of the "Full Summary" column so that it sorts together with the short summary column. I also changed the names of the realname columns, to re-use the field_descs values properly and also to put a space in "Real Name".
Attachment #427023 - Attachment is obsolete: true
Attachment #432778 - Flags: review?(LpSolit)
Comment on attachment 432778 [details] [diff] [review] v2 r=LpSolit
Attachment #432778 - Flags: review?(LpSolit) → review+
Flags: approval+
I forgot to mark this resolved when I did the checkin. revision 7070 modified: Bugzilla/Hook.pm colchange.cgi template/en/default/list/change-columns.html.tmpl
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 622437
Blocks: 272480
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: