Open
Description
Describe the bug
If you retrieve a list of issues with JIRA.search_issues()
, no comments are associated with the individual Issues in the list. You need to then use use JIRA.issue(id=<issue key>)
to get a full Issue with comments.
It seems like "everything else" is included in the search results version of the Issue, so this feels like a bug.
To Reproduce
Steps to reproduce the behaviour:
api = JIRA(server=os.environ["JIRA_SERVER"], basic_auth=(os.environ["JIRA_USER"], os.environ["JIRA_PASS"]))
incomplete_issue = api.search_issues('project = "TEST" AND summary ~ "example"', maxResults=1)[0]
# The incomplete_issue has no comment field:
print(incomplete_issue.fields.comment)
# AttributeError: type object 'PropertyHolder' has no attribute 'comment'
# The full issue does have it:
full_issue = api.issue(id=incomplete_issue.key)
print(full_issue.fields.comment)
# <class 'jira.resources.PropertyHolder'>
Expected behaviour
The Issue retrieved with a search_issues()
should be the whole Issue, not require another trip to the server.
or
The documentation should be very clear and explicit about this, which it is not at present time.
Version Information
Python Interpreter: 3.8.2
jira-python: 2.0.0
OS: Alpine Linux 3.10.4
IPython (Optional): 7.13.0