toggl-track icon indicating copy to clipboard operation
toggl-track copied to clipboard

Support the meta query parameter in timeEntry

Open kekkis opened this issue 2 months ago • 0 comments

The meta query parameter, if set to true, will bring with it meta information such as the client name and the project name in the entry.

So an example entry would look like:

  {
    "id": 1555410329,
    "workspace_id": 2949399,
    "project_id": 265931152,
    "task_id": null,
    "billable": false,
    "start": "2022-07-01T23:53:41+00:00",
    "stop": "2022-07-01T23:58:33Z",
    "duration": 292,
    "description": "bug fixes for toggl-track typescript package",
    "tags": null,
    "tag_ids": null,
    "duronly": false,
    "at": "2022-07-05T03:32:23+00:00",
    "server_deleted_at": null,
    "user_id": 4232226,
    "uid": 4232226,
    "wid": 2949399,
    "pid": 265931152,
    "client_name": 'Example client',
    "project_name": 'Example project',
    "project_color": '#2da608',
    "project_active": true
  },

The new values are client_name, project_name, project_color, and project_active.

It seems adding support for this is rather simple in the timeEntry.ts file. The types are simple enough to deduce as well.

kekkis avatar Apr 25 '24 21:04 kekkis