godbout / alfred-time

Start and stop tracking time with Toggl, Harvest, Everhour or Clockify through Alfred 4. ⏰️
MIT License
110 stars 8 forks source link

Can't get the list of projects #22

Closed gnapse closed 5 years ago

gnapse commented 6 years ago

I have my config file with the toggl api key and the harvest domain and credentials in base64 as instructed (everything double checked). I also have toggl set as my primary service.

I checked in the extension data directory where the config file is located, and I see json files for both toggl and harvest. In particular the toggl one is large and it seems to contain in it a lot of information that it must have retrieved from the toggl api. In particular, I can see that there's information about projects in that json, including projects that I wanted to track time on.

However, when I attempt to start a timer by typing time something<ENTER> into Alfred, I get a second prompt with a clock-like icon to the right, which, according to what I see in the animated gifs in the README, is to type the project or something like that. No matter what I type in there, I get nothing in the dropdown list of suggestion (this list does not even appear). I can type here anything, including hitting , and nothing happens, the prompt stays open, and I can dismiss it with , but that does not help me towards achieving the goal of using this workflow to start a timer on toggl.

(I'd really like to use it to simultaneously start timers on both, but since it was not working, and there's something about needing to have projects called the same in both services, I decided to start simple and try to make ti work with a single service, toggl in this case).

godbout commented 6 years ago

Hello!

Sorry about that. Do you mind I use you to debug? :D

Let's try with just the Toggl service first:

  1. In the config files, set the Harvest service to false.
  2. Then remove both the json files for the projects, toggl and harvest.
  3. Then type "time sync". This should download only the toggl project cache.
  4. Type "time something", press enter, then in the second prompt, you should the list of your toggl projects.

Let me know how it goes. If this works, then we start checking Harvest. Thanks!

gnapse commented 6 years ago

Yup, it works now with toggl only.

godbout commented 6 years ago

Great!

If you wanna try Harvest, in the config:

  1. activate it
  2. put your domain (https://DOMAIN.harvestapp.com)
  3. set the api_token (email:password base64 encoded: https://www.base64encode.org/). Careful when you copy the result, if there are some characters in the encoding, the copy will stop at those characters. Make sure the whole string is copied.
  4. In the timer section of the config file, set your primary service to toggl or harvest
  5. Run "time sync"
  6. Type "time something", press enter, you should see the list of projects especially for Toggl, especially for Harvest, and for both at the same time.

If it doesn't work, please check the json cache file for Harvest to see if it contains the projects. Thanks.

gnapse commented 6 years ago

Just to clarify, when you say "put your domain", you mean only the part "DOMAIN" before harvestapp.com, right?

godbout commented 6 years ago

Exactly. Just one word.

godbout commented 5 years ago

A year has passed.