User:Clarkbw/Bugzilla Link Grabber Extension

From MozillaWiki
< User:Clarkbw
Revision as of 06:28, 4 April 2008 by Clarkbw (talk | contribs) (initial page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is an extension I wrote on Thursday April 3rd 2008 for Thunderbird. The extension looks at the mail in thunderbird's message pane munging bugzilla links and references.

The extension converts in two ways:

  • converting long bugzilla links to short form
  • converting bug shorthand notation into links
    • e.g. bug XXX into <a>bug XXX</a>
    • these bug links use the default bugzilla urls and can sometimes be incorrect

The extension has 2 bugzilla system urls included by default

TODO

There are lots of things to get done, these are the ones that are on my radar.

Make Preferences Window useful

Right now the preferences window is just junk that came with the extension. The purpose of the options is to allow people to add and remove bugzilla URLs to help customize the plugin to their needs.

Here's some simple ASCII art of how it could look.

+----------------------------------------------------------------------------------------+
|   +--------------------------------------------------------------------------------+   |
|   | name                     | url                                                 |   |
|   | bugzilla.mozilla.org     | https://bugzilla.mozilla.org/show_bug.cgi?id=%s     |   |
|   | bugzilla.gnome.org       | http://bugzilla.gnome.org/show_bug.cgi?id=%s        |   |
|   | bugzilla.freedesktop.org | http://bugzilla.freedesktop.org/show_bug.cgi?id=%s  |   |
|   |                          |                                                     |   |
|   +--------------------------------------------------------------------------------+   |
|   [ add ]  [ edit ]  [ remove ]                                          [ close ]     |
+----------------------------------------------------------------------------------------+

There should also be a way to set the default bugzilla

Get the Context Link Menu Working

The point of the right click context menu is that every "bug ###" text gets linkified to your default bugzilla URL. However sometimes the bugzilla you want is actually another one. We can list the alternate bugzillas in the context menu allowing you to choose the correct one apart from the default.

+------------------------+
| Copy Link Location
|------------------------|
| Save Link Target       |
|------------------------|
| Open Bug in Bugzilla > | +--------------------------+
+------------------------+ | bugzilla.mozilla.org     |
                           | bugzilla.gnome.org       |
                           | bugzilla.freedesktop.org |
                           +--------------------------+