Bugzilla Tips

March 3, 2010

Linkify Like A Bugzilla Comment

Filed under: Uncategorized — gervmarkham @ 1:55 pm

Have you ever had a chunk of text and wished you could apply the Bugzilla comment autolinkifier to it?

  • Autolinkified URLs, bug numbers and attachment numbers (with “details” link)
  • Bug numbers have the bug title as the tooltip
  • Strikeout style for closed bugs

Wish no longer.

This could be handy for e.g. some wiki text involving a load of bug numbers.



  1. Also worthy of mention is the Bug Id Helper Add-on https://addons.mozilla.org/en-US/firefox/addon/10263

    Comment by Aaron — March 3, 2010 @ 4:08 pm

  2. Interesting, except of course it relies on you including the appropriate CSS rules to do all that and it isn’t dynamic so as bugs change from open to closed your page won’t update. More fun would be some JS to do do lookup for bug references in a general page’s content and apply the styles dynamically.

    Comment by Dave Townsend — March 3, 2010 @ 5:56 pm

  3. Unless whatever you’re pasting the stuff into has a reference to the Bugzilla style sheet, you don’t really get the strikeout style.

    Further, the page emits relative links, which don’t do much good outside of Bugzilla (and inside Bugzilla you’re then saddled with excess HTML markup).

    Finally, most wikis (at least MediaWiki) don’t handle the “a href” syntax, so you don’t actually get a link (or the “title” text).

    I like the idea behind this, but it seems like the implementation is still incomplete for the suggested use-cases. I think the use-case where the current output would work best is an HTML page where you can import the Bugzilla style sheet and set a “base href” for the page; anything else is going to require a lot of post-processing on the user’s end.

    Comment by Smokey Ardisson — March 3, 2010 @ 7:06 pm

  4. You are right about the relative links. I’m sure it didn’t do that when I first wrote it (many moons ago).

    MediaWiki does/can support “a href” though – at least, wiki.mozilla.org does, ISTR.

    Comment by gervmarkham — March 3, 2010 @ 7:51 pm

  5. As far as I can tell, wiki.mo does not understand “a href”; see https://wiki.mozilla.org/User:Sardisson/Test

    Also, http://meta.wikimedia.org/wiki/Help:HTML_in_wikitext states that “the anchor element is not allowed.”

    Comment by Smokey Ardisson — March 3, 2010 @ 8:08 pm

  6. I’ve been using AutoLink for nearly five years now, since around when Jesse released it: http://www.squarefree.com/2005/05/22/autolink/

    Doesn’t do as much (doesn’t magically fetch the summary or state the bug), but is generalized to other forms of text too. Ships its own style (border bottom, IIRC).

    Comment by Mook — March 4, 2010 @ 5:57 am

RSS feed for comments on this post.

Create a free website or blog at WordPress.com.

%d bloggers like this: