After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 151464 - More magic could be done with docs
More magic could be done with docs
Status: RESOLVED FIXED
Product: bugzilla.gnome.org
Classification: Infrastructure
Component: Simple bug guide
unspecified
Other Linux
: Normal minor
: ---
Assigned To: Bugzilla Maintainers
Bugzilla Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-08-31 01:00 UTC by Andrew Sobala
Modified: 2005-01-01 23:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Auto select 'docs' component for docs bugs. Hide 'docs' component for other bugs. (1.68 KB, patch)
2004-08-31 20:43 UTC, Olav Vitters
none Details | Review
Patch v2 (1.68 KB, patch)
2004-08-31 21:12 UTC, Olav Vitters
committed Details | Review

Description Andrew Sobala 2004-08-31 01:00:49 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.
Comment 1 Olav Vitters 2004-08-31 19:39:01 UTC
> Default to "docs" component if it exists.

Should s-b-g still offer a choice to select a different component? ("No" would
be easy)
Comment 2 Olav Vitters 2004-08-31 20:43:38 UTC
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. :)
Comment 3 Elijah Newren 2004-08-31 20:49:26 UTC
Shouldn't
  if (!defined($comp) && (0 == $#components)) {
be
  if (!defined($comp) && (1 == $#components)) {
i.e. s/0/1/ ?
Comment 4 Olav Vitters 2004-08-31 21:01:12 UTC
No, $# gives the number of items minus one (I've tested it). 
Comment 5 Olav Vitters 2004-08-31 21:09:38 UTC
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.
Comment 6 Olav Vitters 2004-08-31 21:12:52 UTC
Created attachment 31156 [details] [review]
Patch v2

@components returns the number of items, this can be compared with 1
Comment 7 Elijah Newren 2004-08-31 21:31:12 UTC
Shows what I get for blurting out without testing and forgetting some of my
Perl...  OOPS.  :-}
Comment 8 Andrew Sobala 2004-08-31 23:14:59 UTC
Looks good but I'm not playing with bugzilla right now - will commit tomorrow
hopefully.
Comment 9 Olav Vitters 2004-12-27 23:59:10 UTC
Ping :)

Please commit the patch.
Comment 10 Dave Neary 2004-12-28 11:02:19 UTC
Comment on attachment 31156 [details] [review]
Patch v2

Setting mode on patch.
Comment 11 Olav Vitters 2005-01-01 23:51:01 UTC
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.