zenhob / hcl

Command-line tool for manipulating Harvest timesheets
http://zenhob.github.io/hcl
MIT License
223 stars 45 forks source link

Projects list doesn't get updated #77

Open mustafa01ali opened 7 years ago

mustafa01ali commented 7 years ago

Initial setup works fine, however any new projects that I am added to do not show up when I try to fetch the list of all tasks using hcl tasks. Haven't gone through the code, but perhaps the projects and tasks are being cached locally to speed things up. Is there a way to refresh it?

Edit - I can see the new projects on the Harvest website.

jhawksley commented 7 years ago

I see this too. I tried using the --reauth option to at least log in again -- no change.

mustafa01ali commented 7 years ago

I was able to refresh the list by deleting the local cache (~/.hcl/cache/tasks) and fetching the list of tasks.

On Dec 19, 2016 1:53 PM, "John Hawksley" notifications@github.com wrote:

I see this too. I tried using the --reauth option to at least log in again -- no change.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zenhob/hcl/issues/77#issuecomment-267907051, or mute the thread https://github.com/notifications/unsubscribe-auth/AAu22eRmzTvAhCZTFBqwYkGR2SyMRk_6ks5rJj77gaJpZM4LGMEP .

jhawksley commented 7 years ago

@mustafa01ali workaround works great - thanks!

dpikt commented 7 years ago

Awesome, this worked for me too! The path on my system was ~/.hcl/cache/tasks.yml. Version 0.4.15 for reference.

dpikt commented 7 years ago

Btw this is a pretty big issue for companies that add new projects regularly. Maybe there should be a flag for clearing the cache, something like hcl tasks --clear-cache?

@zenhob I would be happy to open a PR for this if you think it's a good idea.

dpikt commented 7 years ago

Just saw #71 😀