December 17, 2013

How many hours did you do on this or that project this year?

Yikes, its getting close to the end of the year and I just know somewhere someone is lurking in the shadows to be checking my daily hour registrations. Unfortunately, this year the tool used to post hours in is the *agile* tool redmine.

This tool is of course not compatible with the company hour registrations, so I better create a report by doing some cmdline stuff. Luckily, redmine can export timespend to a csv file this i what I did.

Once the file is ready the following cmdlines can be of assistance for analysing the timesheet data

1. Find All hours spend in 2013 and dump it to a new file
  grep 2013 timelog.csv > time_2013_me.csv

2. Find all projects worked on in 2013
  cut -d ';' -f 1 time_2013_me.csv | sort | uniq

3. Find total amount of reported hours
  cut -d ';' -f 7 time_2013_me.csv | awk '{total = total + $1}END{print total}'

4. Find all hours on a specific project
  grep <project name> time_2013_me.csv | cut -d ';' -f 7 | awk '{total = total + $1}END{print total}'

5. Find alle de andre end specifikt projekt:
  grep -v <project name> time_2013_me.csv | cut -d ';' -f 7 | awk '{total = total + $1}END{print total}'

That's it and that's that.

No comments: