Extending Bugzilla Links in Thunderbird

I took a couple hours… ok most of the day yesterday to fix a little issue that’s been bothering me for a while.

Bugzilla links inside email messages.  I get countless messages where people reference bug 426175 but then don’t link to the bug.  The other option is for the person to include the link in the email which is ugly and pushes the flow around https://bugzilla.mozilla.org/show_bug.cgi?id=426175 because there is a large link inside the text.

Despite emails not being HTML mail, for whatever reasons, I still want bugs to be linked in a reasonable manner when I’m looking at my mail.  I couldn’t find an existing solution, though there likely is one hiding somewhere.  So I started a new extension to solve my problem.

The Bugzilla Link Grabber Thing

I’m not good with names, another reason I probably shouldn’t have kids.  (Offspring of Bryan Clark Jr.)

Here is a typical message that contains a mix of bugzilla urls and shorthand bug mentions.  You can see the urls are long and a bit ugly, while the short hand link mentions (even though this example mentions the same bug) are not linked to the bug itself.

Before you view any mail the extension takes the long bugzilla urls and converts them into the shorthand form.  It also linkifies any shorthand bugs into working urls.

Right now the extension only understands mozilla bugzilla and gnome bugzilla because that’s all I have accounts for.  But others could be added and I was hoping to have a preferences dialog that allows you to add alternate bugzillas (see TODO).  But otherwise it works great.

For xpi downloads, source, TODO, and more details take a look at the Bugzilla Link Grabber wiki page.

Fixing things

If you’re interested in this working for your copy of bugzilla or see some bugs in the code, don’t ask, please dive right in and fix things. Don’t forget to grab the STEEL extension or this one won’t work.  Also it only works on thunderbird nightly builds right now; but maybe that’s something you can fix.

I put the extension source up at github, sorry if that’s not your RCS of choice.  Anybody who creates patches to fix one of the TODO items is welcome to one of my remaining invites to github.  I don’t really have anything else to give…

13 responses to “Extending Bugzilla Links in Thunderbird

  1. Kurt

    Sweet! Thanks

  2. jonner

    Is it smart enough to convert the plaintext ‘bug xxxxx’ into a link to the right bugzilla based on the from address of the email? (e.g. if the mail came from a gnome.org address, it should create a link to gnome bugzilla, and if it came from a mozilla.org address, it should create a link to mozilla bugzilla, etc.)

  3. jonner: that’s a great idea! It doesn’t have that kind of smarts, but I’d love to see it. Grab the code if you can!

    Another suggestion was that if it sees one kind of bugzilla link that it uses that for the default in that message. I’m not sure if that’s the right behavior, but we can try it.

  4. Mike McLean

    Yeah. Knowing which bugzilla is the real trick. Keying off of the sender’s email is interesting, but would of course fail a lot.

    I just use a handy bookmarklet for opening non-linked bugzillas that folks send me.

    Another option for making the links smaller is tinyurl. Also note that the bugzilla.redhat.com accepts urls of the form https://bugzilla.redhat.com/426175
    Still a little big, I realize, but somewhat less flow impeding.

  5. Mike McLean

    Yet another idea. Configure the extension to offer a (configurable) list of bugzilla links.

  6. JoeS

    Thanks for singling out my post as an example of an “ugly post” :)
    (no offense taken, I know exactly what you meant)..The acceptance of HTML posting in newgroups is the obvious answer. IMHO it’s an example of intransigence in some parts of the community, that makes an extension neccessary when the real answer is to use available, and generally accepted practices.

  7. James Napolitano

    Bugmail contains all sorts of “X-Bugzilla-foo” headers to enable better filtering. I think there’s a bug to add the URL of the bug database as a new header precisely so filters can tell what database a bugmail is from. I think the easiest way to extract the URL now is from the “Do not reply to this email. You can add comments to this bug at
    https://bugzilla.mozilla.org/show_bug.cgi?id=212790” line.

  8. JoeS: Yeah, I didn’t mean to single you out in anyway. The only reason it was chosen was because I tested against it a bunch. It had urls and short names, plus you included comment anchors. :) But you make a good point, there’s no reason why I’m not writing in HTML as well.

    James: it might be possible to grab those headers and use them for additional information about the bug that can be displayed or to guess the correct URL.

  9. Pingback: Bryan Clark » Blog Archive » Travel, Work and Other Updates

  10. Pingback: John Resig - Simple Extensions in Firefox 3

  11. Pingback: Cómo programar extensiones para Firefox

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

aboot

This is the blog personality of Bryan Clark. I'm a designer in a world of open source. This blog reflects mostly writing about Design, Open Source, Economics, Beer, Wine, and Dogs. There's more information about me on this site or you can contact me directly at clarkbw@gmail.com.

scategories