Skip to content

Tool to reformat timr time tracking to export it to external time tracking tools

License

Notifications You must be signed in to change notification settings

k0pernikus/timr-report-manager

Repository files navigation

timr-report-manager

unit tests Scrutinizer Code Quality Code Coverage

License: MIT

Tool to reformat timr time tracking to export it to external time tracking tools

Use Case

Generating reports to easily and quickly forward them to external time tracking tools.

Timr in its free version has the limitation to only track one activity. One can use the Notes annotation field as a " task descriptor" via #.

I have the use case to track my time both for:

  • total work time over the course of a day (e.g. 'phone call with hannes', 'ticket #123', 'writing ticket')
  • time spent on specific tasks (e.g. a ticket #123)
  • it shows the hours both in the hour:minute (e.g. 5:15), and as hours (e.g. 5.25) for working with different time tracking tools at the same time

Conventions

Keywords in Notes

Location

  • enter: means entry of office location, won't be considered working time
  • exit: time marker when one has left the office

Ticket

  • # prefix, or any message containing a tag, e.g. #123 or #jobDescription will be shown in the ticketing overview
  • other entries without these markers won't show in the ticketing report
  • only one tag per time entry allowed

Requirements

  • Download your timr csv
  • My page
  • You may use: https://YOUR_USER.timr.com/timr/reports/workingTime.html
  • php^8.0

Installation

git clone [email protected]:k0pernikus/timr-report-manager.git
cd timr-report-manager
composer install
php timr.php

Usage

$> php timr.php format:odoo --csv path_to.csv
DATE: Fri, 2024-10-18
DAY TOTAL: 5:15 hours

        [09:44 - 10:06] [#ticket123] (22 min)
        < 6 min break >
        [10:12 - 10:21] PC Adminstration (9 min)
        [10:22 - 11:30] Call mit Heino (68 min)
        [11:30 - 11:54] [#ticket42] (24 min)
        < 16 min break >
        [12:10 - 14:29] [#ticket123] doing something related to #Ticket123 and it should be billable (139 min)
        [14:29 - 15:22] Meeting Max Mustermann (53 min)
$> php timr.php format:redmine --csv path_to.csv

Date: Fri, 2024-10-18
Total hours tracked:5.25 hours
💩Non billable hours:2.17 hours (41.33%)
 Billable hours:3.08 hours (58.67%)

Rounded up to the nearest value of 1/4
󱞩 #ticket123: 2.75 h
󱞩 #ticket42: 0.5 h

The overview is also there to get a quick understanding of hours worked vs hours required.

php .\timr.php overview -c .\tests\csv\monthly.csv
2024-10: Expected 60 / Delivered 63.9

ToDos

Must Haves

Extended Features

  • sync with external services,
    • e.g. redmine
    • odoo

Basic Features

  • in the ticket report, only show activities having a ticket id number included
  • support keywords, exit, enter, ...
  • ... and tags #{any_tag_starting_with_hashtag}
  • tags should be discovered even if only part of the text
  • yet only one tag may be part of the note
  • automatically summarize activities having the same end and start date when having the same note
  • redmine formatter should round up to the next quarter

Nice to haves

  • support different languages
  • vacations, sick days, and holidays instead of hardcoded
  • distinguish / filter out user
  • RedmineFormatter round up value should be input flag
  • also show break times over the course of a day
  • formatting

DX Experience

  • Code style, slightly changed PSR12 style
  • phpstan
  • resolve DIR issue when coding on windows using WSL
  • nice badges
  • GitHub action for unit tests
  • scrutinizer
  • automatically update README.md examples
  • scrutinizer code coverage
  • code coverage

About

Tool to reformat timr time tracking to export it to external time tracking tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published