-
Notifications
You must be signed in to change notification settings - Fork 675
Closed
Description
Hi,
I'd like to use the set_time_estimate and add_time_spent method of the api as mentioned in docs/gl_objects/issues.py. I want to set automatically (for an import script) time spent and estimated from already existing issue.
If I use the following code :
import gitlab
gl = gitlab.Gitlab("http://mygitlaburl", private_token="MyPrivateToken")
gl.auth()
data = {
"title": "test title",
}
issues_api = gl.projects.get(2).issues
issue = issues_api.create(data)
result = issue.set_time_estimate({'duration': "10h"})
issue.add_time_spent({'duration': '9h'})
I've got the following error :
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gitlab/base.py", line 582, in __getattr__
return self.__dict__['_updated_attrs'][name]
KeyError: 'set_time_estimate'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gitlab/base.py", line 585, in __getattr__
value = self.__dict__['_attrs'][name]
KeyError: 'set_time_estimate'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gitlab/base.py", line 605, in __getattr__
return self.__dict__['_parent_attrs'][name]
KeyError: 'set_time_estimate'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "myscript.py", line 77, in test
result = issue.set_time_estimate({'duration': "10h"})
File "/usr/local/lib/python3.6/site-packages/gitlab/base.py", line 607, in __getattr__
raise AttributeError(name)
AttributeError: set_time_estimate
I think it's an issue in library or api. I'm using the 1.3.0 of your the python-gitlab and my gitlab version is 10.4.1-ce.
Reactions are currently unavailable