OscarValerock / Clockify-PowerBI

This repository contains the project for a Power BI Custom connector that connects to Clockify
MIT License
14 stars 5 forks source link

Clockify API Change - `GET /workspaces/{workspaceId}/users` - memberships #4

Closed JonParton closed 2 years ago

JonParton commented 2 years ago

Hi @OscarMartinezV / @OscarValerock ,

It seems Clockify have updated their API and broken things again ... On the 18th May 2022 they:

Updated default parameter for "Find all users on workspace" from ALL to NONE

This means that the call to get Users that the Power BI File / Plugin does no longer returns Membership information that is used to get the users Hourly Rate.Amount and Hourly Rate.Currency.

To solve this we need to change the current api call made from:

"/api/v1/workspaces/"&workspaceid&"/users?page-size=200"

to

"/api/v1/workspaces/"&workspaceid&"/users?page-size=200&memberships=ALL"

This then makes the users call behave like it used to before they changed the default and that all expected properties are populated.

If I get chance I'll do a PR to fix this!

JonParton commented 2 years ago

@OscarMartinezV , @OscarValerock - The pull request above (#5) should close out this issue. However, The Plugin code will need building / testing / publishing again.

I also noticed that the .PBIT has changed loads since the one I am using and no longer pulls out the users Rate from their memberships it just leaves memberships as a [LIST] which is not expandable.

However, if anyone did dig into this column by editing the query it at least now has data in!