Add the action back into JIRA email subjects

by milesj Email

JIRA 4.4 introduced a change to the automatic emails that are sent when an action (such as a user commenting) is performed on an issue.

Up until JIRA 4.3, the subject of these emails would include the action, such as:

[JIRA] (MYPROJ-17) Commented: As a scientist, I want a big red button, so that I can take over the world

JIRA 4.4 removes that action from the email subject:

[JIRA] (MYPROJ-17) As a scientist, I want a big red button, so that I can take over the world

This was done because having the action in the subject breaks GMail's email threading.

For those of us that don't use GMail, and actually find it useful to have the action in the subject, you can put it back by editing each of the template files in WEB-INF/classes/templates/email/ and adding in the $eventTypeName variable, such as:

($issue.key) $eventTypeName: $issue.summary

Each file is only one line long, so they are quite easy to edit. Restart JIRA and you'll have the action back in your subject lines!

There's more info at http://confluence.atlassian.com/display/JIRA/Customising+Email+Content

And you can vote for this as a user-configurable option at https://jira.atlassian.com/browse/JRA-25591

Antarctic Voyages iPhone Application

by milesj Email

About this app:

The Antarctic Voyages iOS app lets you view up-to-date information about the current (or most recent) Antarctic voyage as conducted by the Australian Antarctic Division with Australia's Antarctic research vessel, the RV Aurora Australis.

View screenshots and Download Antarctic Voyages from the iTunes Store.

With the Antarctic Voyages app you can:

  • view the latest webcam images
  • view the ship track on an interactive map
  • view the latest readings from the on-board, scientific sensors
  • view situation reports from the voyage leaders

This app is a great way too see what it's like pushing through the ice at the lower latitudes, and also an excellent way to stay close to loved ones that may be on-board!

Works with iPhone, iPad, and iPod Touch.

All data is from the current voyage. If there is no current voyage then webcam images, maps and data are from the most recent voyage. The Australian Antarctic shipping schedule can be found at http://www.antarctica.gov.au/living-and-working/travel-and-logistics/shipping-and-air-schedules.

Data and images originate from the Australian Antarctic Division and are licensed for use under Creative Commons by Attribution 3.0.

Upcoming improvements:

  • A better map. The current map sometimes goes blank when crossing the dateline.
  • Improved local map tile caching
  • Add the voyage schedule to the app
  • Push notifications when a new voyage is about to begin
  • Customisable push notifications when a voyage reaches a certain location
  • Display of waypoints and events

Miles Jordan (the developer) is an employee of the Australian Antarctic Division.

If you have a suggestion, please comment below.

Nested CFLayouts in Coldfusion 9

by milesj Email

If you've tried nesting cflayouts in coldfusion 9 then you may have noticed that it breaks.

What seems to be happening is that the inner layouts are not being sized and fitted to their parent layouts and the page that they are on.

Coldfusion 9 uses the ExtJS 3 framework for its layouts, and Ext uses the doLayout() function on its objects to perform such an operation. It seems that CF9 is overlooking this, at least to some extent.

So as a workaround you could simply grab the layout and call its doLayout() function after the page has finished loading, right? And for this you can use the Ext.onReady() function. However, it seems that Ext.onReady() can fire before the layouts are loaded for some reason. I think it only happens within a Coldfusion environment, not when using Ext straight up.

How do you do it? Well it's a bit hackish, but you can use javascript's setTimeout() function to keep running a function that checks if the nested layouts exist before running doLayout() on them. See the following example.

 

<cflayout name="outerLayout" type="border"> 
    <cflayoutarea name="mainarea" position="center"> 
        <cflayout name="tabLayout" type="tab"> 
            <cflayoutarea name="tabA" title="Tab A"> 
                TAB A 
            </cflayoutarea> 
            <cflayoutarea name="tabB" title="Tab B"> 
                <cflayout type="border" name="tabABorderLayout"> 
                    <cflayoutarea name="tabA1" position="left"> 
                        A1 
                    </cflayoutarea> 
                    <cflayoutarea name="tabA2" position="center"> 
                        A2 
                    </cflayoutarea> 
                </cflayout> 
            </cflayoutarea> 
        </cflayout> 
    </cflayoutarea> 
</cflayout>  

And in your head section:

<script language="javascript"> 
    function setLayout(){ 
        try { 
            ColdFusion.Layout.getTabLayout("mainTabs").addListener('tabchange', function(){ 
                ColdFusion.Layout.getBorderLayout("tabABorderLayout").doLayout(); 
            }); 
        } catch (e) { 
            setTimeout("setLayout()",20); 
            //console.log("waiting..."); 
        } 
    }
    Ext.onReady(function(){ 
        setLayout(); 
    }); 
</script> 

Now, if anyone has a good suggestion as to a well-priced coldfusion host, I'd be happy to move to it so I can show some real examples!

Outlook 2007 and plain text

by milesj Email

I hate Outlook 2007. I don't like using it. Unfortunately, like many other public servants, I have little choice in the matter until I get home and open my macbook pro.

There are two big issues with it that I can't stand. The first is the rubbish RSS support that it has. I mean, RSS is pretty standard these days, right? So why, if you are subscribed to a few RSS feeds in Outlook, does it freeze the whole program every second or two? Because it's crap (well, actually because it's constantly synchronising with Internet Explorer). The only way to get around it is to turn off RSS. Not a good option for me - I follow many blogs that I take no shame in plugging, including Paul Ramsey, James Fee, Ray Camden and SlashGeo. I don't want to run a separate RSS reader because I like that it's integrated with my email, so I put up with it.

Second, I can't stand emails that are of a simple, textual nature, yet sent in HTML. Even if you have Outlook set up to compose in plain text, if someone sends you a HTML email and you hit reply, you will be composing in HTML. I'm an active member of a number of mailing lists, and find that HTML really clutters them up. It's much easier to keep track of a conversation if the entire thread is in plain text.

Outlook QuoteFix was a great solution with Outlook 2000, but unfortunately it doesn't work with Outlook 2007. However QuoteFix Macro does. I recommend it. To use it you have to turn on the option to view all messages you receive in plain text (which I like). But never fear, if you do get an email that is supposed to be viewed as HTML you can on a per-email basis by clicking on "This message was converted to plain text" at the top of the message, and choosing "View as HTML".

Moving Oracle Spatial data to PostGIS

by milesj Email

I put together a small Geotools based jar that Coldfusion can use to copy data from Oracle Spatial directly into PostGIS. Previously, we had needed to export the data as a shapefile, and use shp2pgsql to load the data into PostGIS.

That method had an ESRI imposed limitation, in that the length of shapefile attribute names can only be up to 10 characters long, whereas Oracle column names can be much longer, so they were truncated. No good!

Even though Geotools made it ridiculously easy to implement, it turns out I didn't even need to do it. I should have thought of ogr2ogr in the beginning! Of course, it supports Oracle Spatial and PostGIS, and its main function is to convert features from one data type to another. Anyways, here's how you would do it.

First you need to download ogr2ogr with the OCI driver. You can get it from FWTools but I found it easier to use the one distributed with OSGeo4W, from OSGeo, becuase it already includes the OCI driver.

The OCI driver uses a thick connection to your Oracle database, so you need to have the Oracle Instant Client or SQL Developer installed on the machine that you wish to connect from. This doesn't have to be the PostGIS machine or the Oracle machine - it can just be your normal desktop. Anyways, you need to copy the oci.dll that comes with your Instant Client installation to the "bin" directory of OSGeo4W.

Also, make sure you can connect to your Oracle database using the instant client. If you can't do that, you need to edit your TNSNAMES.ORA until you get it right.

Now you should be able to use ogr2ogr to connect to oracle using the name you gave it in your TNSNAMES.ORA, and transfer spatial tables to PostGIS, using this command (on one line):

Code:

ogr2ogr -a_srs <srs> -overwrite -f "PostgreSQL" -nln <postgis schema>.<postgis table> PG:"host=<postgis host> user=<postgis user> password=<postgis password> dbname=<postgis database>" OCI:<oracle user>/<oracle password>@<oracle tns name>:<oracle schema>.<oracle table>

It looks complicated, but it's really not.

Open source software wins again. Why does anyone still use shapefiles again?

1 2 >>