Timekeeper 2.0 beta now available

It has been quite some time since the last update of the Timekeeper for Eclipse plug-in. Having used it myself for a while I soon realized that the tool was promising, but there were some essential bits that had to be improved. So all this time I’ve been mucking about carefully planning, developing and testing improvements.

After I started using the excellent Eclipse Installer my workflow has changed: For projects that I don’t work on very often, I typically create a new installation whenever I need it and scrap it when I’m done. Since the timekeeper data were stored in the Mylyn Tasks metadata they would be lost once the installation and workspace got wiped. Sometimes I even have the same projects open in different workspaces, so the timekeeping data would be stored in different places.

Some tasks are not easily resolved and I can spend a little time over several days on these, so I also wanted a way to track these activities and make short notes for each.

The last bit I felt was missing was having the ability to customize reports and switch between i.e. different plain text or HTML summaries. Looking forward there it may even be possible to export to various other tools.

In addition to fix a few bugs, I’ve addressed all of the above concerns in the upcoming release. This blog post attempts to make a summary of the most important changes.

Technologies used

As always with hobby projects there is an opportunity to learn. So when implementing these new features and improvements I wanted to make use of some APIs and technologies that I believe I should know more about. As a result the data is now stored in a H2 SQL database, mapped to POJOs using the Java Persistence API with EclipseLink. Establishing the baseline and migration to a new version of the database is handled using Flyway, and finally; reports are generated using Apache FreeMarker.

Database configuration

The Database configuration page in preferences (Timekeeper > Database) allows you to configure where the database for the current Eclipse instance should be kept. The default is to place it in the shared location, under .timekeeper in your home folder. But you can also use a workspace relative path, or even a H2 server if you have one running.

Multiple instances of the Timekeeper can share the database as it utilizes a H2 feature called mixed mode. This will automatically start a server instance on port 9090 if more connections are needed.

The Export and Import buttons are used for exactly that. CSV files, one for each table, are created once a destination folder has been selected. Note that when importing, the data is merged with what’s already in the database. So if you at some time want to start with a clean sheet, it you will have to delete the database files while no Timekeeper instance is up and running.

Recording task activity

As you might notice from the screenshot below, there are now activities associated with each task. Each activity has a start time and a stop time that can be manually edited. While as before you could only assign a number of hours to each task.

Local task repositories are just that. So each task is assigned a number in sequence. That won’t work by itself when storing local task information in the database, so for each workspace an identifier is created to keep track of activities related to a local task. If you wipe the workspace these are lost, however they still exist in the database so you could retrieve them if you really wanted to.

Reports

The only report templates that are already in place are quite simple. There are two HTML versions, one using Font Awesome for some eye candy, and the other without. Both basically replicate the “workweek” view.

Configuring Report templates

The report templates have their own configuration page in the preferences (Timekeeper > Report Templates). Here you can add your own templates or modify the existing ones. The source editor has very basic support for FreeMarker syntax highlighting.

Currently there is support for three different content types: HTML, plain text and Rich Text Format.

The default template is the one used when simply pressing the report toolbar button in the workweek view. Activating the pulldown menu will show all templates, allowing you to select the one you want.

There is currently no documentation on how to use the various functions and data structures in the report engine. Please examine the existing templates for now if attempting to do modifications or create your own.

Summary

I think the new features added to the Timekeeper plugin to Eclipse makes it much more usable, now it’s only a matter of ironing out the bugs. It appears fairly stable, but there may still be issues that I have not noticed even after weeks of use. Such a large rewrite is a bit scary. In any case, I’m releasing a beta-version now so that those of you interested can give it a spin. You can point your Eclipse plug-in installer UI to https://resheim.net/p2/eclipse-timekeeper_beta/ and take it from there.

If you want more details, the project code is found at https://github.com/turesheim/eclipse-timekeeper.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.