GNOME Bugzilla – Bug 151464
More magic could be done with docs
Last modified: 2005-01-01 23:51:01 UTC
When we're filing a docs bug: * Default to "docs" component if it exists. When we're not filing a docs bug: * Remove the "docs" component from the component list before doing any more logic on it. Should work.
> Default to "docs" component if it exists. Should s-b-g still offer a choice to select a different component? ("No" would be easy)
Created attachment 31154 [details] [review] Auto select 'docs' component for docs bugs. Hide 'docs' component for other bugs. Thank you for choosing the easiest option to implement. To show my appreciation I even tested this on my local bugzilla-new setup. :)
Shouldn't if (!defined($comp) && (0 == $#components)) { be if (!defined($comp) && (1 == $#components)) { i.e. s/0/1/ ?
No, $# gives the number of items minus one (I've tested it).
Comment on attachment 31154 [details] [review] Auto select 'docs' component for docs bugs. Hide 'docs' component for other bugs. I'll make a new patch to use @ so I compare with 1.
Created attachment 31156 [details] [review] Patch v2 @components returns the number of items, this can be compared with 1
Shows what I get for blurting out without testing and forgetting some of my Perl... OOPS. :-}
Looks good but I'm not playing with bugzilla right now - will commit tomorrow hopefully.
Ping :) Please commit the patch.
Comment on attachment 31156 [details] [review] Patch v2 Setting mode on patch.
Patch has been committed. Tested with gtk+. It auto selected the docs component for a documentation bug and correctly hidden that component for other bugs. Marking FIXED.