PhpReport meets Hamster

Some time ago, we realized that some igalians used Project Hamster to track their daily work, to know exactly when they started working and on what; later, that data was moved to PhpReport manually. So we thought it was a good idea integrating both applications.

We developed a patch to the development version at that time, to add some basic functionality:

  • Send a particular task from Hamster to PhpReport.
  • Send the tasks of an entire day to PhpReport.

Notice that the communication is one-way only; Hamster doesn’t notice changes done later in those tasks in PhpReport. Besides, the data model of Hamster is different, so users have to complete some missing information after sending the tasks to PhpReport. Nevertheless, that’s better than writing down everything manually…

It looks like this:

How the applet looks like login screen

And this is what you get:

Lately I’ve been thinking on how to continue the development. The code base of Hamster has changed a lot in the last months, so my patches are now basically useless… But in any case, the data models are different and I’m not very sure about the approach to take.

It seems I’m not the only one with this problem: the synchronization issue has been around for some time in Hamster bugzilla. There were different proposals, but there isn’t an agreement yet. Maybe should I develop a specific PhpReport client from scratch?

Meanwhile, I leave the code for you to check it out and give it a try:

git clone http://git.igalia.com/hamster-applet-phpreport.git
cd hamster-applet-phpreport/
git checkout origin/phpreport-gnome-2.27.91

And for compilation and installation:

./autogen.sh --prefix=/usr
make
make install

The prefix is necessary because the applet server doesn’t look into /usr/local (the default route) for new applets. And this installation will conflict with any installation of hamster-applet you could have done before.

I compiled it in ubuntu lucid (it should work for karmic too, but I couldn’t make it in jaunty) and I needed the following development packages:

python-dev
python-gtk2-dev
python-gnome2-dev
libgconf2-dev

Finally, you can launch the application in an independent window with debugging purposes, using this command:

/usr/lib/hamster-applet/hamster-applet -w

7 thoughts on “PhpReport meets Hamster

  1. Jacob,

    Thanks for publishing your efforts.

    A few recommendations:

    * make atomic commits, so they can be re-based more easily.

    * use only English language for everything

    * avoid code duplications (seems that applet.py and edit_activity.py duplicate some functionality)

    • Thanks for your recommendations. The main problem we have rebasing the patch is that it seems that the file structure has changed and the files we modified don’t exist anymore in the HEAD of the repository.

      I think that my next step in this topic would be contacting the interested people through bugzilla and try to find a structure where we can fit our different requirements for synchronization.

  2. Pingback: Speaking in silver… » PhpReport meets Hamster… in photographs

  3. First of all, thanks for this feature. As an user of phpreport and hamster, I find it very interesting.

    Some time ago I was thinking about doing what you’ve done, but using a rather different approach, to avoid touch hamster. The idea was to use the XML exported from hamster and upload it to phpreport using a command line tool. This should avoid some of the problems you mentioned.

    Also, with the help of a configuration file, you can define the mapping of phpreport fields from hamster fields, and even default values based on values from other fields.

    For instance, telling that “story” field in phreport is got from “tag” field in hamster, or that “client” field in phpreport will be “CCCC” if project is “PPPP” (which in turn is got from “category” field in hamster).

    • @J.A.

      Your solution looks interesting too, and it could even be a start point for a command-line client for PhpReport. Unfortunately, I still have things to do to polish the web interface and it would take some time 😛 .

      • @tm

        First of all, thanks for your comment, and congratulations for such a great work with hamster 🙂 .

        I’m also very interested on your suggestion. I’ll give it a try, maybe I can reuse some code from the existing web interface of PhpReport.

Leave a Reply

Your email address will not be published. Required fields are marked *