manofearth / toggly

Toggl to Youtrack time synchronizer
3 stars 1 forks source link

Quick docs? #1

Open wizonesolutions opened 6 years ago

wizonesolutions commented 6 years ago

Hi! This project looks like what I need to sync time from Toggl to YouTrack (their In Progress/Paused auto-time tracking is driving me crazy). I was wondering if you could share the basics on how to configure it and what I might need to change (e.g. hardcoded timezone).

How does it avoid double-adding entries?

Thanks.

manofearth commented 6 years ago

Hi, sure

  1. Run composer install or composer_install.sh if you use Docker
  2. Change timezone here to your's
  3. Copy config-example.json to config.json and fill provided settings
  4. Here is the map of Toggl tags corresponding to YouTrack work types: "toggl tag" => "YouTrack Work Type". Change it according to your needs.
  5. Change the YouTrack project prefix here
  6. Here is my attempt to deduplicate work items, you can do better
  7. Play with other methods of VastSyncer class if you need
  8. Sync period is hardcoded now, change it here if you need
  9. Run the application with php index.php command or with run.sh script if you use Docker

You're welcome to ask more questions here

wizonesolutions commented 6 years ago

Thanks. I'm really slow getting to this, but every time I forget to put time entries in YouTrack and spend like 20 minutes manually moving data from Toggl, my interest grows...so I will do it soon and let you know if I have any questions or manage to generalize more parts of the script.

manofearth commented 6 years ago

Glad if you'll find it useful!

wizonesolutions commented 6 years ago

Worked great! I'll do a PR with some config improvements (so that everything dynamic can be handled in config.json). The default deduplication seems to work fine for me, and it also worked even though I don't use the work types (I don't tag Toggl entries). That could probably be handled in configuration, too, but I had no need to.

I also made it support multiple project codes...ideally I would've just retrieved my active projects from YouTrack, but I don't actually know its API and didn't want to spend time on it :)

manofearth commented 6 years ago

Thanks for your contribution, I've just approved it