gitlab-time-tracker
gitlab-time-tracker copied to clipboard
gtt report: time records have the wrong date
Hi,
I start a time entry for an issue with gtt start xx and then gtt stop. I expect after gtt sync to have that entry in my report for the day I have actually done it. But doing gtt sync on a different day shows that entry for the day I have run the sync not the actual time tracking so I end up having different results with gtt log and gtt report -f xx-t xx
GitLab doesn't offer an API to submit the date when your time was actually spent (yet). I'm sorry, there's nothing I can do right here. Also see #39
Is there an issue for the GitLab API yet? They aim to allow you to do all operatons you can do in the UI via the API as well, one just needs to poke a bit usually.
EDIT: Apparently not, https://gitlab.com/gitlab-org/gitlab-ce/issues?scope=all&utf8=%E2%9C%93&state=opened&label_name[]=time%20tracking&search=api
I have opened an issue https://gitlab.com/gitlab-org/gitlab-ce/issues/47324 but didn't receive any reply from the team for more than a month
Hi all First thanks for this useful tool.
To record the spend date, the method discussed in #39 works at least for my gitlab installation (13.8.0-ee). This is by using the notes API as follows:
curl --request POST --header "PRIVATE-TOKEN: xxxxxxxxxxxx" "https://yyyyyyyy:8080/api/v4/projects/A/issues/B/notes?body=%2Fspend%2015min%202021-02-18"
see my commit here: https://github.com/ndu2/gitlab-time-tracker
I could not find any documentation on this feature, so see it as a workaround until gitlab enhances the add_spent_time API