Closed felipead closed 7 years ago
Hello! Really, _data
is empty in bundle and value objects.
But you can get all information about value from object.attirbutes, like this:
bundle = connection.get_enum_bundle('40-30-1470750250809')
bundle_value = bundle.values[0]
print(bundle_value.element_name)
print(bundle_value.description)
I don't know why _data
is empty. One underscore is weak "internal use" indicator. So, don't use it ;) It used on Issue and other classes.
What python version do you use? I get an error in bundle.to_xml()
https://github.com/devopshq/youtrack/issues/10
@felipead Can we close this issue? I am working with to_xml
in #10
@allburov Python 3.6.3
@allburov yes, you can close the issue. Thank you!
Thanks for the feedback! :)
I've finally found out the the code that produce the results I wanted:
def teams(self) -> List[str]:
bundle_id = self.__connection.get_custom_field('Team')['defaultBundle']
return (i.name for i in self.__connection.get_enum_bundle(bundle_id).values)
It's not possible to retrieve custom enum bundles. These methods from
Connection
class don't work:They return empty objects. I've debugged these objects and I could see that their
_data
properties is an empty dictionary.When issuing an HTTP request directly, as in:
This is the (anonymized) response I get:
This is my debugging session: