You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get details from the issue and to expand some of the fields (like changelog). Looking at the code I noticed we have a method named issue:
which takes expand params. I tested it and everything works well.
But we also have method get_issue:
def get_issue(
self,
issue_id_or_key,
fields=None,
properties=None,
update_history=True,
):
"""
Returns a full representation of the issue for the given issue key
By default, all fields are returned in this get-issue resource
:param issue_id_or_key: str
:param fields: str
:param properties: str
:param update_history: bool
:return: issue
"""
base_url = self.resource_url("issue")
url = "{base_url}/{issue_id_or_key}".format(base_url=base_url, issue_id_or_key=issue_id_or_key)
params = {}
if fields is not None:
if isinstance(fields, (list, tuple, set)):
fields = ",".join(fields)
params["fields"] = fields
if properties is not None:
params["properties"] = properties
if update_history is True:
params["updateHistory"] = "true"
if update_history is False:
params["updateHistory"] = "false"
return self.get(url, params=params)
which takes few other parameters fields=None, properties=None, update_history=True but not expand. Is there a good reason to have to methods which basically serve the same functionality which different set of accepted parameters?
Im thinking about adding PR with:
if expand:
params["expand"] = expand `
condition to get_issue method and add a deprecated note to issue method (so that people relying on that method can re-write their code before removing duplicated issue method. What do you think?
The text was updated successfully, but these errors were encountered:
I am trying to get details from the issue and to expand some of the fields (like changelog). Looking at the code I noticed we have a method named issue:
which takes expand params. I tested it and everything works well.
But we also have method get_issue:
which takes few other parameters fields=None, properties=None, update_history=True but not expand. Is there a good reason to have to methods which basically serve the same functionality which different set of accepted parameters?
Im thinking about adding PR with:
condition to get_issue method and add a deprecated note to issue method (so that people relying on that method can re-write their code before removing duplicated issue method. What do you think?
The text was updated successfully, but these errors were encountered: