2

I'm trying to query gitlab ce api v4 to get all time spend and time estimate events. Querying issues seems to only provide current total time stats. Does anyone know how to do this?

My goal is to be able to get daily/weekly time stats for a group's projects.

Eric Gagnon
  • 81
  • 10

1 Answers1

2

I think that you can't get daily/weekly directly, but there are different solutions which already implement what you need.

This one for example: https://github.com/kriskbx/gitlab-time-tracker/tree/master/src as you can see here: https://github.com/kriskbx/gitlab-time-tracker/blob/master/src/gtt-report.js#L35 provides what you need.

Claudio Acciaresi
  • 31,951
  • 5
  • 33
  • 43
  • Since I could not find how it's done in the link above, [here is a link to the code](https://github.com/kriskbx/gitlab-time-tracker/blob/ec5ca47d2e45f087dccb6bbdddc970935a61c256/src/models/hasTimes.js) where the time spent is parsed from the issue notes. – Rafael-WO May 06 '22 at 07:31