Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtt report: time records have the wrong date #51

Open
Fattouh92 opened this issue May 22, 2018 · 4 comments
Open

gtt report: time records have the wrong date #51

Fattouh92 opened this issue May 22, 2018 · 4 comments
Labels

Comments

@Fattouh92
Copy link

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

@kriskbx
Copy link
Owner

kriskbx commented May 22, 2018

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

@sils
Copy link
Contributor

sils commented Jul 4, 2018

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

@Fattouh92
Copy link
Author

Fattouh92 commented Jul 4, 2018

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

@kriskbx kriskbx changed the title gtt report shows wrong time records gtt report: time records have the wrong date Aug 28, 2018
@ndu2
Copy link

ndu2 commented Feb 19, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants