I can access a property that has a space using the raw dictionary as follows :
However how can I do it without using this dictionary like I do for other roles ?
First of all, there’s no reason to avoid using the raw dictionary. It’s part of the jira-python interface, it’s well-defined, and as you see, it works when names have spaces.
It turns out you are not asking a jira-python question. You’re just asking a python question: How do I access an object’s attribute using the dot notation when the attribute name has spaces in it? And the answer is that you can’t do it. You have to do something like use the “getattr” function, like so:
getattr(jira.project('prj1').roles, 'Product Manager')
There’s other ways in python to do it, but like I said, it’s really a python question.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG