Hi,
I am trying to retrieve the issuelink associated with an issue using jira-Python. But, receiving following error:
AttributeError: type object 'PropertyHolder' has no attribute 'issuelinks'
Code:
issueKey = 'RM-9948'
issue = jira.issue(issueKey)
print(issue.fields.summary)
print (issue.fields.customfield_10115)
print (issue.fields.customfield_10116)
print (issue.fields.customfield_10117)
print (issue.fields.customfield_10146)
print(issue.fields.issuelinks)
I am able to get all other field values including subtasks except issuelinks. Any help will be appreciated.
Versions:
Jira : - 7.4.3
Python :- 3.7
Jira-Python :- 2.0.0
Thanks,
Links are not a field. Try getting them directly from the issue.
Thanks Nic!! Tried directly from the issue but still not working.
issueKey = 'RM-9948'
issue = jira.issue(issueKey)
print (issue.issuelinks)
Also, tried print (issue.links)
Receiving below error:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python37-32\lib\site-packages\jira\resources.py", line 161, in __getattr__
return self[item]
TypeError: 'Issue' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\SRE-Tools\SourceCode\jiraExampleCmds.py", line 15, in <module>
print (issue.issuelinks)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\jira\resources.py", line 177, in __getattr__
raise AttributeError("%r object has no attribute %r (%s)" % (self.__class__, item, e))
AttributeError: <class 'jira.resources.Issue'> object has no attribute 'issuelinks' ('Issue' object is not subscriptable)
As per the latest Jira-Python documents - https://jira.readthedocs.io/en/master/jirashell.html lists issuelinks access using issue.fields property:
issue.fields.issuelinks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Nic!! Tried directly from issue but still not working.
issueKey = 'RM-9948'
issue = jira.issue(issueKey)
print (issue.issuelinks)
Also, tried print (issue.links)
As per Jira-Python docs - https://jira.readthedocs.io/en/master/jirashell.html , issue links must be retrieved using issue.fields property:
issue.fields.issuelinks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.