jolicode / harvest-php-api

🌾 A Harvest API PHP Client
MIT License
22 stars 6 forks source link

Query Parameter "is_running" is not working for time entries #17

Closed ahawlitschek closed 4 years ago

ahawlitschek commented 4 years ago

When trying to request only the running timer entries, every entry will be returned

$entries = $harvestClient->listTimeEntries(['is_running' => true]);
dd($entries);

results in

image

Somehow the filter is not applied. Obviously there aren't 100 timers running :D

xavierlacot commented 4 years ago

Hi @ahawlitschek

Thanks for the issue report.

This issue is related to the way the Harvest API expects to receive booleans (as the strings true or false). At the moment, we send boolean filters as 0 or 1 values, which doesn't work. So, all the boolean filters in this client are broken at the moment. Once merged, the pull request https://github.com/janephp/janephp/pull/358 in janephp will allow to fix this issue.

ahawlitschek commented 4 years ago

Thanks for the reply!

So the issue will be gone in the near future. Thanks :)