Saturday, October 11, 2014

GNOME Bugzilla attachment status

I have been asked to help in migrating GNOME's Bugzilla instance to a latest stable version. Currently it is a version 3.4 with lots of modifications (or extensions, if you will). Quite an oldie - it is 2.5 year old. And it (obviously) does not get any bugfixes or security updates anymore.

If I remember correctly, I was asked because I admitted to Chris that I know a wee bit of Perl and I did not dislike it. So when Kat (a member of GNOME Foundation Board) asked him if he knows anybody who could help with it, he directed her to me.

(Did I mention that I, Chris and Kat used to work in the same company, at Openismus, for a short while? "lovely how our company links still work" said André, GNOME Bugmaster and also a colleague from the company. Heh heh.)

I am no Bugzilla expert, but after reading a diff between stock 3.4 and GNOME Bugzilla I had an impression that 3.4 is not really extensible in clean way - lots and lots of modifications are sprinkled all over the place. In default templates, in Bugzilla core, in CGI scripts.

So I was asked to help in porting the attachment status to 4.4. From user's perspective this extension only adds three things:
  • Another column to attachments table in bug view (example) showing status of patch. Or nothing, if attachment is not a patch. 
  • A combobox in attachment editing page (example). Click "edit details" at the top of the page to see it.
  • An option to fields combobox in advanced search page (example, see "custom search" section).
Development was painfully slow, mostly because it was done in my oh so copious free time. But, after 5 months or so, it is finally there, ready for testing. Just see the example links above. The code is on GNOME git now. Note that this extension is probably not compatible with an old one, so third-party tools might not work with it. I also managed to keep all the code inside the extension, that is - no changes in core. It is unfortunately not very pretty.

Any future work on this extension? Probably making third-party tools (namely git-bz) work with it. And maybe adding an attachment specific section to advanced search if GNOME bug wranglers want it.