Applescript – elapsed duration in human friendly time units

When planing and managing your projects with Merlin for Mac OS X you have 4 main windows: Activities, Resources, Netplan, Utilization.

Depending on the view you have selected, the main area offers you different details and information about your project. You can view and in certain cases modify the main outline of your project, adding activities, groups and milestones. Furthermore, this area also allows you to work interactively with the Gantt chart, Netplan and resource utilization.

Per default the label in the Gantt bar show the expected duration in working times. So it may show 2 days for example for a task starting Friday and ending Monday if weekend is defined to be workfree time.

If you want the label in the Gantt to show the real time elapsed, you may do so. Just go to View > Show View Options > Styles
Click into the label you want to edit and select “expected elapsed duration” for its content.

This of course would then show the duration in e-units. What to do if you don’t want those edays, emonths, eweeks to be shown? You may use attached script sample created in AppleScript.

It goes throught all activities of the top most opened project, checks for the expected elapsed duration of the task, and writes it in the subtitle field in human friendly units. If you enable the display of “subtitle” for the label, you are set.

Note: The script cannot create a live connection between the columns “subtitle” and “expected elapsed duration”. That is, before printing your project, make sure you call the script again Gantt  to actualize outputted data. Continue reading