Change your logo..

April 3rd, 2008 by Michael Pryor

I have a bit of a confession to make.  I spend a lot of time interacting with customers (which I'm told is a bit out of character for the president of the company) but I enjoy getting feedback from them and it helps me know where we need to focus our efforts.  We get some requests over and over again and while to the end user they may seem very simple to implement, the reality is far from that.  But that wasn't going to stop me from getting a feature out that I really wanted customers to have in this latest release (coming to On Demand later this week).

One request that we get fairly often is the ability to customize the look of different parts of FogBugz, particularly the logo.  It probably makes the kiwi a little sad, but I understand … no hard feelings.  The only issue is that FogBugz is not the same application it used to be when I used to write code for it in version 2.0 and 3.0.  It has lambda functions, code generators, ajax requests;  which is fine for our brilliant developers but not for me and my limited IQ… one change here can affect a bunch of things over there that you never expected.

I had a bit of free time and I thought, "How hard could it be to let people upload a new image for the logo?"  It turns out, in this case it's pretty complicated.  To upload files, a form needs to have a certain encoding: multipart/form-data.  In php and asp, it's not trivial to decode this file upload, and in asp in particular it means you have to treat the rest of the form elements differently than you would have if it was a normal form post.  We do this for cases currently, but it means I couldn't just throw a File Upload input in an html form on the Site Configuration screen.  Also, storing files in the database requires a special table that will hold binary blob data.  We already have this for uploaded Attachments in FogBugz.  And if we're going to be serving a file from the database, I had to make sure the browser would cache it for a long time, but still download a new one if an admin decided to change it.  It just meant my tiny little code change was growing into a bigger code change, which meant it was unlikely to get done because of the amount of effort it would take.

So in the latest minor version we're about to push out, I piggybacked my feature on the already existing File Upload mechanism.  I protected it so users' couldn't just mine for any old attachment, and I made it so when you change the logo, your browser knows to download a new one.  Unfortunately the user experience is, well, a bit clunky.  You have to make a case, add your logo, and then copy the link for the logo to the site settings  — rather than just clicking "Browse…" and uploading a new file on the Site page itself.  Since this isn't a feature that would get used daily, or even monthly, I'm hoping I get some slack for my albeit strange design and that people are happy to use it.