X Tutup
Skip to content

Time tracking#222

Merged
gpocentek merged 7 commits intopython-gitlab:masterfrom
savenger:time_tracking
Mar 3, 2017
Merged

Time tracking#222
gpocentek merged 7 commits intopython-gitlab:masterfrom
savenger:time_tracking

Conversation

@savenger
Copy link
Contributor

@savenger savenger commented Feb 16, 2017

This adds support for gitlabs time tracking feature #221

Sascha Mahmood added 2 commits February 15, 2017 16:05
- get/set/remove estimated time per issue
- get/set/remove time spent per issu
@GhostLyrics
Copy link
Contributor

The automated build failed. Please fix :)

@gpocentek
Copy link
Contributor

Thank you. Could you squash your commits in a single one? Thanks.

@GhostLyrics
Copy link
Contributor

@gpocentek you can do that from the merge interface too https://github.com/blog/2243-rebase-and-merge-pull-requests

@gpocentek
Copy link
Contributor

Ah nice! Never used this before, thanks @GhostLyrics

@gpocentek gpocentek merged commit 92151b2 into python-gitlab:master Mar 3, 2017
@savenger savenger deleted the time_tracking branch March 3, 2017 13:24
@DmytroLitvinov
Copy link

DmytroLitvinov commented Mar 20, 2017

@gpocentek Hi. Cool feature was added, but it`s not documented. http://python-gitlab.readthedocs.io/en/stable/gl_objects/issues.html. But as I see here you added documentation.

@gpocentek
Copy link
Contributor

@DmytroLitvinov the documentation is available at http://python-gitlab.readthedocs.io/en/latest/gl_objects/issues.html (latest instead of stable). It will switch to stable once I release the version containing this change (soonish).

Thank you for checking!

@DmytroLitvinov
Copy link

DmytroLitvinov commented Mar 20, 2017

@gpocentek It will in version 0.20 of this library, right? If yes, could you specify the release date, please.

@savenger
Copy link
Contributor Author

I just saw that the documentation was not committed correctly. Should I open a new issue or re-open the issue? Or just open a new pull request?

@DmytroLitvinov
Copy link

DmytroLitvinov commented Mar 20, 2017

@savenger Is it work correctly? I have an error.

Traceback (most recent call last):
  File "gtest.py", line 24, in <module>
    issue.reset_time_spent()
  File "/home/dmytro/.virtualenvs/GetMyHours/src/python-gitlab/gitlab/objects.py", line 432, in __getattr__
    raise AttributeError
AttributeError

It is method reset_spent_time at issue instance. Not reset_time_spent.
https://github.com/gpocentek/python-gitlab/blob/master/gitlab/objects.py#L1584

Also

Traceback (most recent call last):
  File "gtest.py", line 25, in <module>
    issue.time_estimate({'duration': '3h30m'})
TypeError: time_estimate() takes exactly 1 argument (2 given)

@DmytroLitvinov
Copy link

DmytroLitvinov commented Mar 20, 2017

Also it is replaced logic in functions:
https://github.com/gpocentek/python-gitlab/blob/master/gitlab/objects.py#L1584
and here https://github.com/gpocentek/python-gitlab/blob/master/gitlab/objects.py#L1597 in variable url . At add_spent_time you reset spent time and in reset_spent_time you add time.

@gpocentek
Copy link
Contributor

@DmytroLitvinov yes it will be in 0.20. I'm not sure about the release date, waiting on a couple changes. It shouldn't be long though (end of week, or next week maybe).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup