/ domm

I hack Perl for fun and profit.

Follow me on twitter!
Atom Icom ... on Atom!
<<<<<<<<<<
25.12.2014: Making presents with Perl
07.12.2014: First release of lib::projectroot
30.11.2014: Please review File::LoadLocalLib
26.10.2014: Videos of Austrian Perl Workshop 2014
05.09.2014: Going to Silicon Valley
29.08.2014: Things I learned at YAPC::Europe 2014 in Sofia
10.07.2014: Where will YAPC::Europe 2015 take place?
04.06.2014: Announcing the Austrian Perl Workshop 2014
27.05.2014: Modification of a read-only value attempted
25.05.2014: App::TimeTracker::Command::Trello

I recently used Trello while working on a side project. Trello is yet another Todo-Tracker, or "a free web-based project management application made by Fog Creek Software" (as Wikipedia says at the moment).

I found Trello quite usable, but I'm more of a command-line person. I also quite like App::TimeTracker (no big surprise, as I wrote most of it...). So I wrote a plugin to integrate Trello and App::Timetracker, called App::TimeTracker::Command::Trello. The plugin uses WWW::Trello::Lite, which worked as advertised. Developing App::TimeTracker::Command::Trello was quite easy, as I basically copied App::TimeTracker::Command::RT, ripped out the RT-specific parts, and replaced them with Trello-code.

It was quite nice to see that the rather complex architecture of App::TimeTracker worked out and made it easy to add new features!

The biggest obstacle was that Trello does not really provide anything like a card-id. Well, of course each card (and everything else) has an id, but the look like this: 53725ca0bef77fda44558218. Not very easy to remember or type. So I employed a small hack that seems to be used by other Trello-Add-Ons as well. I made it mandatory that each card's name has to start with a unique pseudo-id, like "@t42:@" (so the full Card name would be "@t42: Rev up the FluxCompensator@"). Luckily the web interface is quite smart, so I could enter a bunch of empty cards by just typing t43: ENTER t44: ENTER etc.

Having set up my board like this I could now do:

tracker start --trello t42

This will start a new git branch named t42_rev_up_the_fluxcompensator, move the card into the Doing-List, and start tracking the time spent on this task.

Well, it would, if you are somehow logged in to Trello. Which is not that easy as it might seem, because Trello is not using the venerable username/password scheme (so 90'ies!), but an OAuthy app-id/auth-token approach. Which means, you somehow have to acquire such a token. Which is quite annoying. To make my life easier, I added a new command, setup_trello.

Invoking this command starts a sort of interactive walk trough, that tells you which URLs you need to open, and expects you to paste some keys back. I did not use any fancy prompting module, because I was the bad kind of lazy (my $yes = <STDIN>), so I guess the next release will include some proper prompting.

There are some more options you can fiddle with, eg if you want cards moved to certain lists on certain events. I also hacked some minor time tracking into Trello itself, by storing the time worked on a task again in the card title ([w:23m] would mean "worked 23 minutes"). I have some unfinished plans on adding more such tags (mostly: [e:30m], i.e. "estimate: 30 minutes"), and maybe some additional tools to add new pseudo-ids and to report on time-worked vs estimated.

Anyway, feel free to play with App::TimeTracker::Command::Trello (or just App::TimeTracker, if you don't care about Trello..). Any feedback is appreciated!

P.S.: I guess I will rip out some of the in fact optional parts of TimeTracker, and put them into distinct distributions. There is no need to install all the RT dependencies, if you're not using RT and just want to track your time.

Comments (via disqus)

>>>>>>>>>>