Archive for the ‘Tips and tricks’ Category

FogBugz – Email edge detection

A while ago I was involved in a project at Clyral where we developed a web based support ticketing system (similar to Zendesk). One of the things we focused on was dealing with the detection of new content in an email conversation. Typically, emails would bounce back and forth between a customer and an agent and we wanted to ensure that our web interface wasn’t cluttered with the full email thread for every reply the customer sent in (the original conversation was always included in outbound emails for convenience).

When we looked at implementing the mechanism which would only extract new content from an inbound email, we found it surprising that there was no official standard for demarcating the beginning and end of an email in an email thread. We took a look at a few mail clients and discovered that Microsoft Outlook is capable of dealing with this problem. If you use one of newer versions of Microsoft Outlook, you’ll notice that the client is capable of detecting the boundaries between emails. Take a look at the screenshot below:

image

Notice how Outlook has detected the boundaries between each email. Each email has a gradient which assists you to navigate the thread, furthermore, if you hover over a specific email, you can jump to the next/previous email in the thread relatively easily.

While there didn’t seem to be a standard way of achieving this, we managed to get a decent solution in place for our ticketing system. Since we were sending out the emails which customers would reply to, we could standardise the email content such that we could easily detect the boundary when a customer responded. This was not a full proof solution, so in the end, we implemented a heuristic algorithm that could deal with most of the common mail clients out there. Implementing this feature made it infinitely easier to manage conversations with customers. Obviously, we always kept keep the original email as customers would sometimes reply with changes to the original email content (such as answering questions inline).

Last year, we started using FogBugz as our general case and project management system. What we discovered was that FogBugz isn’t as smart as the system we developed in terms of dealing with email conversations. Outbound emails would not include the full email conversation and if you don’t use the web interface to respond, the boundary between the new content and email thread isn’t detected at all. This usually leads to a very cluttered case view where you need to scroll over copious amounts of duplicate text.

To deal with this problem, I implemented a very simple JavaScript customisation which scans over the content in a case and hides any email text which is superfluous. You always have the capability to toggle the content if you do need to inspect it. I’ve included the code for the customisation below. We use Microsoft Outlook (and most of our clients do as well), so the solution works well for us. The code simply scans email for the ‘From: ..’ and splits the email there. It’s not rocket science.

$(function(){
    $('.emailBody').each(function(index, element){
        var body = $(element);
        var edgeIndex = body.html().indexOf('<br>\nFrom: ');
        if (edgeIndex == -1){
        	return;
        }
        var mainBody = body.html().substring(0, edgeIndex);
        var quotedBody = body.html().substring(edgeIndex);
        body.html(mainBody);
        body.append('<div class="showQuote" style="padding-top:5px"><a href="javascript:void(0);" class="dotted" onclick="$(this).parent().parent().find(\'.emailThreadBody\').toggle();">- show quoted text -</a></div>');
        body.append('<div class="emailThreadBody" style="display:none;"></div>');
        body.find('.emailThreadBody').html(quotedBody);
    });
});

Hope this helps. Hopefully, this issue is addressed in the next major version of FogBugz.

Cheers,
Rohland

Outlook plugin to enhance FogBugz email notifications

We’ve recently started using FogBugz to track the work we do. It’s early days, but we’re hoping FogBugz’s Evidence Based Scheduling (EBS) feature will be able assist us to schedule our sprints better. One thing I found particularly annoying when we first started using the product is that there is no easy way to customise the email notifications you receive. I believe it is possible to update the template when using the self hosted option but that requires fiddling with their code. This is the typical notification one receives if someone edits a case that’s assigned to you (or in the case someone notifies you of a change to a case you are potentially not assigned to):

image

The notification has all the information you need, however, it’s pretty hard to pick up the message someone may have included. I’m not a fan of plain text emails. When you start receiving a number of these notifications every day, it gets a bit annoying trying to scroll and find the meat of the notification. On Saturday I spent a few hours developing a plugin for Outlook 2010 that could assist with the issue. While this was not my only option (I could have developed a FogBugz plugin), I was intrigued to see if it was indeed possible to update the format of a message in Outlook. As it turns out it’s pretty easy.

This is the result:

image

I’m no designer (and Outlook’s HTML support is crap) but I’m relatively happy with what I was able to achieve in a short time frame. The plugin will update the email’s format as you open the email so basically, you never have to deal with the plain text version outlined in the first screenshot. Obviously, the downside to this approach is that notifications received on your phone won’t render in the format above (unless you are using Exchange or similar and have opened the email at least once in Outlook).

Other features I was able to add relatively easily included setting the priority flag on the email depending on the priority of the case. If the case is really urgent (priority 1 or 2), the priority flag is set appropriately.

image

If for some reason the parsing fails, the default email format is kept.

I’ve included the source code as an attachment of this post. Feel free to customise it for your needs. It should be relatively easy to update the template as it is bound to a model which is instantiated as a result of parsing the plain text email.

Hope this is useful.

Rohland

Powerpoint with some Deep Zoom shine

I thought I would give the Microsoft Office Labs team a plug after using one of their Office add-ins in a presentation I delivered last week. It had been a while since I last put together a Powerpoint presentation and I wanted to find out if there were any new funky ways of delivering presentation content.

If you cast your mind back to Tech-Ed Africa 2008, you might remember a few demos of Deep Zoom, a technology that allows you to “infinitely” zoom and pan through a large collection of high-res images. The demos were impressive but sadly, I haven’t really seen the technology applied in the wild. So, I decided to look into any advancements in the Deep Zoom toolset that would allow me to put together a presentation relatively simply. It was at this point I stumbled across PPTPlex, a plug-in for Microsoft Powerpoint. It allows you to add some cool Deep Zoom type features to your presentation. Strictly speaking, its not as robust as a true Deep Zoom compilation, but it does allow you to put together a neat presentation without too much work.

Overall, I thought the plug-in was pretty cool and had an extremely low learning curb. I successfully delivered my presentation using the plug-in without any issues. I did have one or two gripes about the plug-in though, the main being that I could not find a way to publish my presentation (I had to have Powerpoint open to present it). Also, you cannot animate any of your presentation elements through PPTPlex – I can understand why this is missing (it would be pretty complex to implement) but it is just something you need to bear in mind.

So, if you’re bored of compiling presentations using the defacto Powerpoint toolset then I would definately recommend looking into PPTPlex. Have fun…

Enable remote desktop remotely

So, this morning I needed to remote into one of our work stations at the office but lo and behold, remote desktop was disabled (ARGGH!). This meant one of three things, either I drive to the office to get it done, forget about the work until Monday or try update the setting remotely. Suffice to say, I attempted option 3 first.

It turned out to be really easy, there are already one or two articles on the web that explain how to do this, but for the folks who don’t know (and for my future reference) I thought posting it here would be useful.

Step 1 – Download PsExec (an awesome utility from SysInternals)

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

Step 2 – Run PsExec as follows:

psexec \\REMOTE_PC_NAME _HERE cmd

This will open a command line session on the machine you are attempting to enable RD on. Any of the commands you execute below will be executed on the remote machine.

Step 3 – Ensure the firewall on the remote machine lets you in

netsh firewall set service remotedesktop enable
netsh firewall set service remoteadmin enable

Step 4 – Update the terminal server registry key which controls remote desktop capability

REG ADD “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server” /f /v fDenyTSConnections /t REG_DWORD /d 0

That’s it! You should be good to go.