Closed Bug 319067 Opened 20 years ago Closed 20 years ago

editflagtypes.cgi should allow to filter flag types based on their product/component

Categories

(Bugzilla :: Administration, task)

2.21
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(1 file, 1 obsolete file)

When you have a long list of flag types, it's pretty hard to see which ones apply to which products and/or components. Having two drop-down menus (one for products, one for components) allowing you to list only flag types applicable to a given product/component would be really helpful.
Assignee: administration → LpSolit
Target Milestone: --- → Bugzilla 2.24
*** Bug 326967 has been marked as a duplicate of this bug. ***
Attached patch patch, v1 (obsolete) — Splinter Review
- If no product is given, return all flag types. - If a product and component are given, only show flag types applicable to them. - If only a product is given (no component), only show flag types which are available for *ALL* components of the product.
Attachment #223859 - Flags: review?(myk)
Attachment #223859 - Flags: review?(wicked+bz)
Status: NEW → ASSIGNED
Comment on attachment 223859 [details] [diff] [review] patch, v1 I don't like the ugly internal error we get when a component is selected without a product. Isn't there anything we can show in this case? I think selection boxes should use __All__ instead of __Any__. Isn't that more to the point what happens when you select Filter? Especially when only a product is selected. >Index: editflagtypes.cgi >=================================================================== >+ sub intersection { >+ my ($aa, $bb) = @_; >+ my %union; >+ my %isect; >+ foreach my $e (@$aa, @$bb) { $union{$e->{'id'}}++ && ($isect{$e->{'id'}} ||= $e) }; >+ return [sort { $a->{'sortkey'} <=> $b->{'sortkey'} >+ || $a->{'name'} cmp $b->{'name'} } values %isect]; >+ } >+ $vars->{'bug_types'} = reduce { intersection($a, $b) } @bug_flagtypes; >+ $vars->{'attachment_types'} = reduce { intersection($a, $b) } @attach_flagtypes; Eek! So complicated and confusing code. But I'm sure it's all needed. At least it seems to work in my test cases. :) >Index: template/en/default/global/js-products.html.tmpl >=================================================================== I would really love to see this JS block containing product list to move to an external .js file than to include it in the page itself. If wanted, this can be dealt with in a separate bug. Probably integrate with similar code in config.js.tmpl at the same time too. >Index: template/en/default/admin/flag-type/list.html.tmpl >=================================================================== >+ <th><label for="product">Product:</th> Add missing </label>. Generates validation warning otherwise. >+ <th><label for="component">Component:</th> Same here. PS. I somehow think this is a lovely feature for bmo and will make timeless a bit more happy. :)
Attachment #223859 - Flags: review?(wicked+bz)
Attachment #223859 - Flags: review?(myk)
Attachment #223859 - Flags: review-
Attached patch patch, v1.1Splinter Review
Attachment #223859 - Attachment is obsolete: true
Attachment #225205 - Flags: review?(wicked+bz)
Attachment #225205 - Flags: review?(myk)
Attachment #225205 - Flags: review?(wicked+bz) → review+
Flags: approval?
Attachment #225205 - Flags: review?(myk)
Flags: approval? → approval+
Checking in editflagtypes.cgi; /cvsroot/mozilla/webtools/bugzilla/editflagtypes.cgi,v <-- editflagtypes.cgi new revision: 1.36; previous revision: 1.35 done Checking in template/en/default/admin/flag-type/edit.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/flag-type/edit.html.tmpl,v <-- edit.html.tmpl new revision: 1.17; previous revision: 1.16 done Checking in template/en/default/admin/flag-type/list.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/flag-type/list.html.tmpl,v <-- list.html.tmpl new revision: 1.13; previous revision: 1.12 done Checking in template/en/default/global/code-error.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/code-error.html.tmpl,v <-- code-error.html.tmpl new revision: 1.70; previous revision: 1.69 done RCS file: /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/js-products.html.tmpl,v done Checking in template/en/default/global/js-products.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/js-products.html.tmpl,v <-- js-products.html.tmpl initial revision: 1.1 done Checking in template/en/default/global/user-error.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v <-- user-error.html.tmpl new revision: 1.173; previous revision: 1.172 done Checking in template/en/default/request/queue.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/request/queue.html.tmpl,v <-- queue.html.tmpl new revision: 1.15; previous revision: 1.14 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: